简体   繁体   中英

I am not able to copy files inside windows directory using powershell

I am trying to install one application remotely and copying related files inside windows directory(C:\\windows\\System32). installation is happening but copying is not happening, but I can able to copy files to other location, Please suggest a way to copy files inside windows directory using PowerShell. I am using copy-item to copy the files.

To work on a remote machine you can use the New-PSSession command: https://technet.microsoft.com/en-us/library/hh849717.aspx
And to do stuff on a remote machine you can use the Invoke-Command: https://technet.microsoft.com/en-us/library/hh849719.aspx

Or you can work with a UNC Path

$path = '\\' + $host + '\c$\System32'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM