我必须得到一个更新的configuration文件在一定距离的几个用户,我想知道是否有人知道一个很好的自动化的方式来做到这一点,而不是发送他们的文件,并通过它说话,因为这将类似于拉牙齿。 每个人都应该在Windows 7上。任何build议将不胜感激!
这些机器是否都在你的域名? 您可以通过组策略首选项来分发文件。
或者你可以只是Robocopy文件。 把它放在脚本里,就像
foreach($_ in Get-Content hosts.txt) { robocopy C:\ \\$_\c$\folder file.cfg }
我需要更多的细节,如果这些选项不会为你做。
如果你喜欢标准的Windows CMD到Powershell,请在命令提示符下尝试:
for /F %f in (listofhosts.txt) do (copy /Y <path to Updated.INI> \\%f\c$\<updatedINIdirectory on host>)
这假设:
1) you have the same account on all hosts (domain admin account) 2) all hosts are on the network
另一种方法是将INI封装到一个ZIP文件中,并select了Pathname选项。 将ZIP邮寄给您的用户,并附带说明
1) save the ZIP in their root C:\ directory 2) extract it.
该文件将被自动复制到相应的目录。