O'Reilly logo

VMware vSphere Troubleshooting by Muhammad Zeeshan Munir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detaching a datastore using vSphere PowerCLI

You can also use vSphere PowerCLI to unmount and detach the datastore in your infrastructure with the following steps:

  1. Download the community-supported script available from the VMware community at http://goo.gl/ER30YK. Review and accept the VMware contributed sample code agreement.
  2. If the script is in a text file, save it as a .ps1 file.
  3. Open vSphere PowerCLI as an administrator and run the following command:
    Import-Module C:\DataStoreFunctions.ps1
    
  4. If the preceding command complains that the script is not digitally signed in the PowerCLI shell, you can use the following command to bypass it for the current PowerCLI session:
    Set-ExecutionPolicy –Scope Process –ExectuionPolicy Bypass
    
  5. Connect with the vCenter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required