- Community Home
- >
- Software
- >
- HPE OneView
- >
- Re: PowerShell OneView commandline clarification
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2019 01:37 PM
01-07-2019 01:37 PM
PowerShell OneView commandline clarification
Hey all, thanks for any help, I'm struggling to get this command to work:
get-hpovserver -name "[server name]" | stop-hpovserver
I need it to stop the server without the prompt to confirm (Yes, Yes to All, No, No to All, etc.). I have to write a script to do many of these servers in one shot. So far my Google-fu has failed me. Any tips?
Thanks!
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2019 02:48 PM
01-07-2019 02:48 PM
Re: PowerShell OneView commandline clarification
Nevermind, figured it out. The command should be:
get-hpovserver -name "ILOMXQ834006Y" | stop-hpovserver -confirm:$false
I wish the documentation was clearer about the possible parameters for all of these scripts. If I look at the commandline specified in the Github page, it reads:
Stop-HPOVServer [-InputObject] <Object>[ [-Async] <SwitchParameter>] [-ApplianceConnection] <Object>[ [-WhatIf] <SwitchParameter>][ [-Confirm] <SwitchParameter>] [<CommonParameters>]
To me, that implies that after the "-Confirm", there should be a space, then some sort of parameter, similar to this:
stop-hpovserver -confirm false
I haven't found anywhere that has a general guide for how to use these parameters, such as "don't put a space, put a colon" and "possible values are: $true, $false", etc.
I've spent so much time banging my head on the unclear documentation for these PowerShell utilities, trying to randomly guess the right parameters... am I just missing something that gives you general usage info (not command-specific info)?
Thanks,
Mike