How to copy a file to machines from a text file?


would able me this? 

i have managed able single machine, same bunch of machines in text file.

$machines = get-content -path "c:\folder\file.txt"

foreach ($machine in $machines){copy-item -path "c:\folder\itemtocopy.txt" -destination "\\$machine\sharedfolder"}


stefan@xperta



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client