This script could also be modified quite easily to run on a remote computer by adding the following at the beginning of the script:

$PC='SRV-NAME-01'
Invoke-Command -ComputerName $PC -ScriptBlock {

In this case, don’t forget to add a } in line 21.

Stefan van Bruggen - 2019

This website uses cookies to track the amount of visitors. This website does not store any personal details, I just want to know which posts are the most popular :) If you continue to use this site I will assume that you accept these cookies (or use a browser plugin like Privacy Badger).Ok