Private/Enter-Hibernation.ps1

function Enter-Hibernation {
    [CmdletBinding(SupportsShouldProcess)]
    Param ()

    if ($PSCmdlet.ShouldProcess("this", "exec shutdown /h /f")) {
        shutdown /h
        #shutdown /h /f
        #Start-Process -FilePath 'rundll32.exe' -ArgumentList 'powrprof.dll,SetSuspendState 1,0,0' -NoNewWindow -Wait
    }
}