I try to find a solution so i can copy a folder contains some powershell modules from a share to multiple machines and to their modules folder under …system32, but only get path not found or access denied. I dont think the Destination line is correct
Reason for this mass-copy is i wanna be able to run theese modules remotely on each server and get windows update status and install updates without to have login to every server
I probably should have looked at all of your code before fixing that 1 part and reposting it lol. -Source isn’t an accepted parameter. Use -Path instead. See below:
Copy-Item : Cannot retrieve the dynamic parameters for the cmdlet. The FileSystem provider supports credentials only on the New-PSDrive cmdlet. Perform the operation again without specifying credentials.
Test without any -cred and get networkpath was not found, got this
copy-item : The path ‘\server1 server2 server3\c$\Program Files\WindowsPowershell\Modules’ is not valid. Only absolute paths are supported on remote copy operatio
Yes i have tried …\system32\WindowsPowershell… get same error