Try something like this
$VMs=Get-Folder-Name"Discovered Virtual Machine folder"|Get-VM
Foreach ($VMin$VMs){
If ($VM.Extensiondata.guest.guestfamily-match"windows") {
Move-VM-VM$VM-Destination (Get-FolderWindows)
}
}
Try something like this
$VMs=Get-Folder-Name"Discovered Virtual Machine folder"|Get-VM
Foreach ($VMin$VMs){
If ($VM.Extensiondata.guest.guestfamily-match"windows") {
Move-VM-VM$VM-Destination (Get-FolderWindows)
}
}