Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (12 sloc) 468 Bytes
# Script to find VMs that are using backup policies different to their datastores' backup policy
$AllDatastore = Get-SVTdatastore
Get-SVTvm | ForEach-Object {
$CheckPolicy = ($AllDataStore | Where-Object DatastoreName -eq $_.DatastoreName).PolicyName
If ($CheckPolicy -ne $_.PolicyName) {
[pscustomobject]@{
'Mismatced VM' = $_.VMName
'VM Policy' = $_.PolicyName
'Datastore Policy' = $CheckPolicy
}
}
}
You can’t perform that action at this time.