That would mean that the condition '$_.guest.osfullname -like "*windows*"' didn't return $true.
That could be caused by the VMware Tools not running.
Can you check with
Get-VM | Select Name,@{N="OS";E={$_.guest.osfullname}}
Since we use an -and, both conditions have to be $true !