$ 0 0 Try changing that last line toConnect-VIServer -Server VCSERVER -Credential $PowerCLICredentials