質問: $false; [system.windows.forms.application]::setsuspendstate($powerstate, $force, $disablewake); } new-alias -name nap -value sleepy_time
回答: あなたの 提供されたリンク コメントセクションで...psスクリプトを作成するか、powershellで次の行を直接実行します。# load assembly system.windows.forms which will be used add-type -assemblyname system.windows.forms # set powerstate to suspend (sleep mode) $powerstate = [system.windows.forms.powerstate]::suspend; # do not force putting windows to sleep $force = $false; # so you can wake up your computer from sleep $disablewake = $false; # do it! set computer to sleep [system.windows.forms.application]::setsuspendstate($powerstate, $force, $disablewake);