- Community Home
- >
- Software
- >
- HPE OneView
- >
- PowerShell OneView commandline clarification
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP