Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Sets the power state of a server hardware resource.
Set-OVServerPower is deprecated. Use Start-OVServer, Stop-OVServer, or Restart-OVServer instead. This cmdlet may be removed in a future release.

Syntax

Set-OVServerPower
    [-Server] <Object>
    [-State <String>]
    [-powerControl <String>]
    [-ApplianceConnection <Object>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Set-OVServerPower sends a power control request to the specified server hardware. It supports both momentary press and press-and-hold actions, as well as cold boot and reset options. This cmdlet is retained for backwards compatibility only. New scripts should use the dedicated Start-OVServer, Stop-OVServer, and Restart-OVServer cmdlets, which provide clearer intent and do not produce a deprecation warning.

Parameters

Server
Object
required
The server hardware object, URI, or name. Accepts pipeline input.
State
String
The desired power state. Valid values: On, Off. Defaults to On. The PowerState alias is also accepted.
powerControl
String
The physical power control action to use. Valid values:
  • MomentaryPress (default) — simulates a momentary press of the power button
  • PressAndHold — holds the power button to force an immediate power-off
  • ColdBoot — removes and restores power (data loss risk)
  • Reset — performs a hardware reset
ApplianceConnection
Object
The appliance connection object or name. Defaults to the default connected session.

Examples

Power on a server

$server = Get-OVServer -Name "Encl1, bay 1"
Set-OVServerPower -Server $server -State On
Powers on the server using a momentary press.

Power off a server with a press-and-hold

$server = Get-OVServer -Name "Encl1, bay 1"
Set-OVServerPower -Server $server -State Off -powerControl PressAndHold
Forces an immediate power-off by simulating a press-and-hold action on the power button.

Power on all servers in an enclosure

Get-OVServer -Name "Encl1*" | Set-OVServerPower -State On

Output

HPEOneView.Appliance.TaskResource Returns an async task for the power state change operation.

Build docs developers (and LLMs) love