< Back

Set-HiveActivePlug

Sat Jan 18, 2020 8:57 pm

NAME Set-HiveActivePlug



SYNOPSIS

Sets Power state on Active plug





SYNTAX

Set-HiveActivePlug [-ActivePlugID] <Guid[]> [-PowerState] <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Sets the power state on the Activeplug supplied to the ActivePlugID parameter





PARAMETERS

-ActivePlugID <Guid[]>

The uniqe ID of the Active Plug to change the power state on, allows multiple id's to be supplied



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-PowerState <String>

The desired power state



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Accepts Pipeline input from Get-HiveDevice





OUTPUTS







NOTES





Author: @pm091



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Turns off hive active lightbulb of supplied id



Set-HiveActivePlug -ActivePlugID 7bf977c0-93ba-4a58-a78a-1ef0d317dd1b -PowerState OFF









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Turns off all hive active lightbulbs



Get-HiveDevice | Where-Object name -Like SmartPlug* | Select-Object -ExpandProperty id | Set-HiveActivePlug

-PowerState OFF











RELATED LINKS

https://github.com/pm091/PowerHive/blob ... ivePlug.md