Powershell复制文件到C: \ windows \ system32系统

  

写一个Powershell脚本碰到这个问题,浪费我好多时间。

  

由于windows系统分32位的,64位的,所当把文件拷贝到system32系统这个系统目录是有区别的

  

直接拷贝命令

  
 <代码> Copy-Item force c: \ temp \ backgroundDefault.jpg c: \ windows \ system32系统\脱体经验\背景信息\ \  
  

64位系统文件会拷贝到<强> C: \ Windows \ SysWOW64 \脱体经验\ info \

  

64位要拷贝到system32系统这个目录,需要写c: \ windows \ sysnative \

  
 <代码> * * Copy-Item force c: \ temp \ backgroundDefault.jpg c: \ windows \ sysnative \脱体经验背景\信息\ \ * *  
  https://social.technet.microsoft.com/Forums/office/en-US/2551af46-b974-4a19-b027-9c0ffe405aac/copy-file-to-cwindowssystem32-on-windows64?forum=winserverpowershell

Powershell复制文件到C: \ windows \ system32系统