【发布时间】:2015-10-20 09:33:46
【问题描述】:
我正在使用 PowerShell DSC 拉取服务器。 每次修改文件时都可以使用文件资源来复制文件吗? 我尝试了以下方法:
File Test{
DestinationPath = "c:\yyy\test.txt"
SourcePath = "\\share\test.txt"
Ensure = "Present"
Type = "File"
Credential = $Credential
Checksum = "modifiedDate"
Force = $true}
但没有运气:如果我从 SourcePath 修改文件,我希望目标文件也应该更新。
【问题讨论】:
标签: powershell dsc