VMware Cloud Community
sureshupadhya
Enthusiast
Enthusiast
Jump to solution

Extract Datastores in Maintenance Mode

Hi ,

I have many datastores which are in maintenance mode which I have moved out of datastore cluster, but they are still connected to host.

Is there any way to find all datastores in the vcenter which are in Maintenance Mode?

so that I can unmount and detach all at once.

1 Solution

Accepted Solutions
schepp
Leadership
Leadership
Jump to solution

Hi,

a simple cmd to find all maintenance datastores would be:

Get-Datastore | Where {$_.State -eq "Maintenance"}

View solution in original post

3 Replies
schepp
Leadership
Leadership
Jump to solution

Hi,

a simple cmd to find all maintenance datastores would be:

Get-Datastore | Where {$_.State -eq "Maintenance"}

sureshupadhya
Enthusiast
Enthusiast
Jump to solution

Thanks a Lot for your quick response...:)

0 Kudos
schepp
Leadership
Leadership
Jump to solution

You are welcome Smiley Wink

For the records: Here you can find info about the Get-Datastore cmdlet: Get-Datastore - vSphere PowerCLI Cmdlets Reference

And here are the states a datastore can be in: DatastoreState

Regards

0 Kudos