Powershell Copy file to listed servers

Copy file to listed servers.


$server_names = Get-Content "C:\Servers_list.txt"
Foreach ($server in $server_names){
             Copy-Item "source-file-path" -Destination "\\$server\destination-file-path-to-save" -Recurse
}

Comments

Popular posts from this blog

Troubleshooting Netlogon Error Codes

Troubleshooting SCEP certificate profile deployment to Android devices in Microsoft Intune