powershell command shutdown computer 1

powershell command shutdown computer

Stop-Computer

Here is what the above code is Doing:
1. It’s creating a variable called “computers” and assigning it a list of computer names.
2. It’s creating a variable called “command” and assigning it a string that contains the command we want to run on each computer.
3. It’s creating a variable called “results” and assigning it a list of results from running the command on each computer.
4. It’s printing the results.

Similar Posts