I am working on automating WSUS updates.
I have a simple, basic script here that I can use: wsus-update · GitHub
It’s also a function, which is good
My desire is to run the function remotely upon an array of servers, like so:
foreach in $servers array, e.g. foreach ($server in $servers) {
** properly connect to server
run the wsus update function
sleep/wait a few minutes
next server
Is this a good way to do this and what code do I need to ** properly connect to the server??
What is the proper code for server connection such that I can use $server and not the actual server name??
Thank you, Tom