$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$credential = new-object Management.Automation.PSCredential($username, $securePassword)
invoke-command -asjob -computername $clientName -credential $credential -scriptblock {
$path = $env:ProgramFiles + '/Windows Mail/'
push-location $path
set-content -path WinMail.cmd -value "WinMail.exe"
./WinMail.cmd
}
the detail please see http://technet.microsoft.com/en-us/library/dd347578.aspx
最后
以上就是虚拟月光最近收集整理的关于invoke-command 应用的全部内容,更多相关invoke-command内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复