天天看點

Datastore Mount/Unmount Detach/Attach functions

A set of functions to allow you to unmount/mount and detach/attach datastores from multiple hosts.

List all datastores and their mount/detach status by passing your datastore object(s) into the Get-DatastoreMountInfo advanced function as shown below:

<a href="https://communities.vmware.com/servlet/JiveServlet/showImage/102-18008-1-17957/List.jpg" target="_blank"></a>

To unmount a datastore pass your datastore object(s) to the Unmount-Datastore advanced function as seen below, this will unmount the datastore from all attached hosts:

<a href="https://communities.vmware.com/servlet/JiveServlet/showImage/102-18008-1-17958/Unmount.jpg" target="_blank"></a>

Once unmounted you will then be able to detach the datastore from the hosts using the Detach-Datastore cmdlet as shown below:

<a href="https://communities.vmware.com/servlet/JiveServlet/showImage/102-18008-1-17960/Detach.jpg" target="_blank"></a>

Script download

<a href="https://communities.vmware.com/servlet/JiveServlet/download/18008-1-78898/DatastoreFunctions.txt" target="_blank">https://communities.vmware.com/servlet/JiveServlet/download/18008-1-78898/DatastoreFunctions.txt</a>

Forward from

<a href="https://communities.vmware.com/docs/DOC-18008" target="_blank">https://communities.vmware.com/docs/DOC-18008</a>

本文轉自學海無涯部落格51CTO部落格,原文連結http://blog.51cto.com/549687/1983749如需轉載請自行聯系原作者

520feng2007

繼續閱讀