< Back

Set-PowerPlanTimedSetting

Sat Jan 18, 2020 9:31 pm

NAME Set-PowerPlanTimedSetting



SYNOPSIS

Set the time, in minutes, of a power setting that uses time as it's value. (EX: the "Turn off hard disk after")

Setting requires a value of minutes starting with 1. The Never boolean argurment sets this value to 0 which means

to never turn the hard disk off after any period of time.





SYNTAX

Set-PowerPlanTimedSetting [-SettingObject] <Object> [[-PowerSettingMinutes] <String>] [[-Never] <Boolean>]

[<CommonParameters>]





DESCRIPTION

Set the time, in minutes, of a power setting that uses time as it's value. (EX: the "Turn off hard disk after")

Setting requires a value of minutes starting with 1. The Never boolean argurment sets this value to 0 which means

to never turn the hard disk off after any period of time.





PARAMETERS

-SettingObject <Object>

Specify the power setting object. This can be passed to it directly with Get-PowerPlanSettingValue or by

storing

the output object of Get-PowerPlanSettingValue in a variable.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PowerSettingMinutes <String>

Specify the timeout, in minutes, that you'd like to set the power setting to.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Never <Boolean>

Set this value to true if you want the power setting to never time out. Effectivly sets the value to 0.



Required? false

Position? 3

Default value False

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



OUTPUTS



NOTES





NAME : Set-PowerPlanTimedSetting

AUTHOR : BMO

EMAIL : brandonseahorse@gmail.com

GITHUB : github.com/Bmo1992

CREATED : September 17, 2019



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



PS C:\\>Set-PowerPlanTimedSetting -SettingObject $(Get-PowerPlanSettingValue -InputPowerPlanId $(Get-PowerPlanId

-Active:$True) `



-InputPowerPlanSettingId $(Get-PowerPlanSettingId -Name "Turn off hard disk after")) -PowerSettingMinutes 60



Set the hard disk to turn off after 60 minutes of inactivity.









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



PS C:\\>Set-PowerPlanTimedSetting -SettingObject $(Get-PowerPlanSettingValue -InputPowerPlanId $(Get-PowerPlanId

-Active:$True) `



-InputPowerPlanSettingId $(Get-PowerPlanSettingId -Name "Turn off hard disk after")) -Never:$True



Set the hard disk to never turn off.











RELATED LINKS