VMware Cloud Community
pamiller21
Enthusiast
Enthusiast

Find VMs Using Default Storage Profile

I am trying to find a way to build a report to find all VMs that have the default storage profile applied, but not sure that is possible.  When I run the Get-SpbmStoragePolicy command I don't even see a the profile listed.

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

If no storage profiles are returned by Get-SpbmStorageProfile there is something wrong in your environment or with your permissions.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
pamiller21
Enthusiast
Enthusiast

Its not that the cmdlet is returning 0 policies, but its not returning the default policy so not sure how to find any VMs using the default:

Name Description Rule Sets Common Rules
---- ----------- --------- ------------
Management Storage … Management Storage policy used for V… {(VSAN.hostFailuresToTolerate… {}
VVol No Requirement… Allow the datastore to determine the…
Management Storage … Management Storage policy used for s… {(VSAN.hostFailuresToTolerate… {}
VM Encryption Policy Keeps VMs on Datastores with Encrypt… {} {}
Management Storage … Management Storage policy used for e… {(VSAN.hostFailuresToTolerate… {}
Management Storage … Management Storage policy used for V… {(VSAN.hostFailuresToTolerate… {}
Management Storage … Management Storage policy used for V… {(VSAN.hostFailuresToTolerate… {}
Host-local PMem Def… Storage policy used as default for H… {(PMem.PMemType (missing)=Loc… {}
vSAN Default Storag… Storage policy used as default for v… {(VSAN.hostFailuresToTolerate… {}
Management Storage … Management Storage policy used for V… {(VSAN.hostFailuresToTolerate… {}
Management Storage … Management Storage policy used for V… {(VSAN.hostFailuresToTolerate… {}

Reply
0 Kudos
pamiller21
Enthusiast
Enthusiast

Ok I have a new strategy to do this, I want to tag VMs using the 'VM Encryption Policy' with one tag else give it a different tag.  But I am not sure how to do an if/then statement like this that will overwrite tags as things change.

Reply
0 Kudos