powershell - Restart-Computer does not have a -UseSSL parameter, gets stuck on "Waiting for WinRM" -
i using powershell v3.0. title suggests, cannot use restart-computer -computername *remotecomputer* -wait
because command gets stuck trying connect winrm.
i need ssl communicate hosts, use -usessl when calling invoke-command or enter-pssession. without that, command fails , i'm guessing it's same reasons winrm check fails.
how restart remote computer , wait restart complete in scenario?
use invoke-command
run restart-computer
command on remote computer.
invoke-command -scriptblock {restart-computer} -computername test
or
invoke-command -scriptblock {shutdown -r -t 0} -computername test
of course, you'll have add -usessl parameter not show because not know syntax it.
Comments
Post a Comment