search
top

Using PowerShell for EMC XtremIO

Introduction

EMC have released XIOS version 4.1.10-33 and XMS version 4.2 recently and with this release they have added PowerShell support. Being a PowerShell guy this is a good thing for automation and maintaining EMC XtremIO. In this post we will cover downloading and installing PowerShell for XtremIO and a few of the available features.

Installation

Download the PowerShell Modules for XtremIO from here https://download.emc.com/downloads/DL71129_XtremIO-Windows-PowerShell-Module-1.0.11.msi?source=OLS. You will need to have an account with EMC to be able to access the download.

Install the package. The libraries will be installed to C:\Windows\System32\WindowsPowerShell\v1.0\Modules. Now you have the PowerShell modules installed and ready to use.

Next you will need to install the root certificate from your array(s) also, to avoid any verification warnings or issues. Load the XMS splash screen and click on and install the certificate into the local Trusted Root Certification Authorities cert store.

xtremio_splash

Once you have the root certificate you need to install it into Trusted Root Certificates Authorities. Click run > mmc and press OK. Click File > Add/Remove Snapin and move Certificates to Selected snapin. When the popup appears select Computer Account, click Next.

xms cert 1

Select Computer account and click Next.

xms cert 2

Select Local Computer and click Finish. Click ok and you are ready to import the certificate.

Expand Certificates> Trusted Root Certificates Authorities and click on Certificates. Right click on Certificates and click All Tasks > Import and the wizard will start.

xms cert 3

Click the browse button and find the downloaded root certificate and select it. Click Next.

xms cert 4

Make sure it says Trusted Root Certification Authorities and click Next.

xms cert 6

Click Finish.

xms cert 7

If you have more than one XtremIO you will need to import their root certificates as well, otherwise you are done and ready to start using PowerShell for XtremIO.

Using PowerShell for XtremIO

So now we can start using some of the many cmdlets available to manage XtremIO using PowerShell.

Open a PowerShell session and load the xtremlib using import-module.

PS C:\> Import-Module XtremLib

Now we are ready to start a session to XtremIO. Using New-XtremSession we can connect to our XtremIO device.

PS C:\> New-XtremSession -XmsName cvgapemcxio01.td.afg –Username <userid> –Password<password>

Note: If you did not install the root certificate this step will fail.

Exiting a XtremSession

When you are done working on you XtremIO cluster or want to manage another cluster you must exit the session. Note when you run this command it will kill all sessions.

PS C:\> Remove-XtremSession

Check XtremIO health

PS C:\> Get-XtremClusters -Properties sys-health-state | ft –autosize

xio_health

Get a List of Storage Controllers

PS C:\> Get-XtremStorageControllers

Get Details on a Storage Controller

PS C:\> Get-XtremStorageController XIO-X1

ps_xio_sc_det

List Tags

PS C:\> Get-XtremTags

ps_xio_tags

Get Details on a specific Tag

PS C:\> Get-XtremTag -TagName SPARE -ObjectType Initiator

ps_xio_tags_det

Get a list of Volumes

PS C:\> Get-XtremVolumes

ps_xio_vol

Retrieve details on a specific Volume

PS C:\> Get-XtremVolume -VolName cvgapesx403-BOOT

ps_xio_vol_det

Note: When you see details output the left column are the properties and will allow you to fine tune your queries to exactly what you want by adding -Property <list of items comma separated>

Conclusion

We have install PowerShell for XtremIO and have explored a few of the 122 functions available. To learn what other possibilities there are available type Get-XtremHelp.

 

 

 

 

 

 

9 Responses to “Using PowerShell for EMC XtremIO”

  1. vaibhav says:

    I am very new to powershell.
    Perfect instructions.. it worked for me..

    after investing a lot of time on google and other options.. Finally this one worked. 🙂

    Do you have any sample script for XIO Health checks ?

    Cheers..

  2. Santha says:

    Thanks for the steps.
    I followed your steps. But unable to establish the connection:

    PS C:\Users\user1> New-XtremSession -XmsName myxms.myhosted.com -Username admin -Password xxxxxx

    Error: XtremIO name or IP not resolveable. It may have been mistyped. This may also indicate that you have not properly
    Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\XtremLib\xtremlib.psm1:6426 char:9
    + throw “Could not retrieve XMS data from XMS Server, or XMS is less then …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (Could not retri…ess then 4.0.0.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.

    I know my XMS version is 4.2.2-18. Any idea?

    Thanks again

  3. Goutham says:

    Hi ,

    I have installed the root certificate and installed the module but authentication is getting failed.

    Error: XtremIO name or IP not resolveable. It may have been mistyped. This may also indicate that you have not properly
    imported the XtremIO certificate.
    Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.
    At C:\windows\system32\windowspowershell\v1.0\Modules\XtremLib\xtremlib.psm1:6426 char:9
    + throw “Could not retrieve XMS data from XMS Server, or XMS is …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (Could not retri…ess then 4.0.0.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.

  4. mtawafig says:

    PS N:\> New-XtremSession

    cmdlet New-XtremSession at command pipeline position 1
    Supply values for the following parameters:
    XmsName: ”
    ConvertTo-SecureString : Cannot bind argument to parameter ‘String’ because it is an empty string.
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\XtremLib\xtremlib.psm1:6399 char:48
    + … $securepassword = ConvertTo-SecureString $password -AsPlai …
    + ~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [ConvertTo-SecureString], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.ConvertToSecureStringCommand

    Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\XtremLib\xtremlib.psm1:6426 char:9
    + throw “Could not retrieve XMS data from XMS Server, or XMS is …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (Could not retri…ess then 4.0.0.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not retrieve XMS data from XMS Server, or XMS is less then 4.0.0.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top