Useful scripts
August 29, 2022
Run PowerShell script to multiple servers remotely
List all servers (better FQDN or IP) in a txt file name "servers.txt".
Keep the PowerShell script (say script.ps1) at the same location as the text file.
$server=Get-Content C:\servers.txtInvoke-Command -ComputerName $server -FilePath C:\script.ps1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment