Sunday, March 6, 2016

VMware PowerCLI find vm in Datastore if it is not in inventory

#Useful to find vm if its disconnected somehow and don't know where vm is present
$dstore=Get-Datastore
clear
foreach($dss in $dstore)
{
write-host $dss.Name


Get-ChildItem  -Path vmstore:\"UK Datacenter"\$dss |Select-String -Pattern "tech-jockey-vm1"

}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...