$ 0 0 Try replacing this line $perfMgr=Get-View(Get-View ServiceInstance -Server $Server).content.perfManager with this $perfMgr=Get-View(Get-View ServiceInstance -Server $Server).content.perfManager -Server $server