I have searched everywhere but I cannot find a command-line or PowerShell script that uses the “shutdown” command but interactively takes input for computer name.
I want to do this:
shutdown -r -f -m
For
All I find in reference to shutting down or rebooting computers though scripts are WScripts or VBScripts that are several paragraph long. I am sure there is a simpler way to do it (especially with PowerShell). I can’t figure out how to get PowerShell to take the text that’s entered as a data for the
PS> reboot.bat \\computer01
I want this to run the batch file that has the above shutdown command and places “\\computer01” as the data for variable
Please help if anyone here knows how to do it. Thanks in advance!