#change here foldername to check
$foldername = "test"
$data = get-folder -Type VM | Where-Object {$_.name -eq $foldername}
if ($data -eq $null) {
Write-Host "$foldername Folder doesn't exist" -BackgroundColor Red
}
else {
Write-Host "$foldername Folder exists" -BackgroundColor DarkGreen
}
for complete report just use command
Get-Folder
---------------------------------------------------------------
Kunal Udapi
Sr. System Architect (Virtualization, Networking And Storage)
http://vcloud-lab.com
http://kunaludapi.blogspot.com
VMWare vExpert 2014, 2015, 2016
If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".