0
如果虚拟机名称存在于vm.txt文件中,Powershell脚本应该启动。 例子:如果虚拟机名称在vm.txt中,则执行
get-vm | foreach-object -process {
If ($_.Name --matches one of the entries in the .txt File) {
execute this part }
else { execute this part }
vm.txt文件: SERVER01 Server02上 server03
非常感谢!
完美,感谢您的快速响应!有时候,解决方法很简单! – Daniel4711 2013-04-24 07:27:23