In the first example this line:
Restart-Computer -Wait -PSConnectionRetryCount 4 -PSConnectionRetryInterval 5
does not work on Windows 8 or Windows Server 2012 as the Restart-Computer activity doesn't support the -PSConnectionRetryCount or -PSConnectionRetryInterval parameters
Remove those parameters and it works correctly
↧