Contents:
To import the module, use the Import-Module cmdlet, and use the top level folder of the module for the path. No need to point explicitly at any .psd1 file, just use the parent folder of the module's files, like:
Import-Module \\path\to\XtremIO.Utils
Get-Command -Module XtremIO.Utils
The cmdlets for connecting to an XMS machine and for opening the admin GUI (Connect-XIOServer, Open-XIOMgmtConsole) each have a -TrustAllCert switch parameter. You can use this switch to ignore certificate errors when connecting or opening a management console, but you should only do so if you know the destination machine and trust that machine.
Connect-XIOServer -ComputerName somexmsappl01.dom.com -Credential (Get-Credential dom\someUser)
The module provides Connect- and Disconnect- cmdlets for handling connections to XMS servers, so that one may connect to an XMS server, and then take further action without needing to supply credentials again for each subsequent call. These cmdlets also update the PowerShell window titlebar with information about the currently-connected XIO servers. See the help for Connect-XIOServer and Disconnect-XIOServer for more information using these cmdlets.
The module can also store an encrypted credential for use with Connect-XIOServer calls. This is a remnant from the days when the module required credentials for every call to get/create XIO objects. For now, such a stored credential can still be used to a small extent:
- Upon storing once (via
New-XIOStoredCred), one can use theConnect-XIOServerfunction from this module without passing further credentials -- the stored credentials will be auto-detected if they are present - One can remove this credential file at will via
Remove-XIOStoredCred - And, the encrypted credential is encrypted using the Windows Data Protection API, which allows only the user the encrypted the item to decrypt the item (and, can only do so from the same computer on which the item was encrypted)
See this module's GitHub Pages page for exciting examples of using the cmdlets from this module, available at https://mtboren.github.io/XtremIO.Utils/.
Opening the Web-based administration GUI (yuck, but better than the Java-based UI):
Open-XIOXMSWebUI -ComputerName somexmsappl01.dom.com
Opening the Java-based administration GUI (yuck)
Open-XIOMgmtConsole -ComputerName somexmsappl01.dom.com
In changelog.md, there is an informative section for each version of the module, with listing of new features, improvements, bug fixes, and more. Be sure to read it for all of the exciting news.
Remove-XIO* cmdlets:
Remove-XIOConsistencyGroup: Removing aConsistencyGroupdoes not affect theVolumeobjects that were in it -- they are not deletedRemove-XIOInitiatorGroup:- If the target
InitiatorGroupis part of aLunMap, the attempt to remove theInitiatorGroupwill fail -- user must first remove givenLunMap - Removing an
InitiatorGroupalso removes theInitiatorobjects that were part of the targetIntiatorGroup
- If the target
Remove-XIOSnapshotScheduler: the API does not yet support removing the associatedSnapshotSetobjects, it seems, so removing theSnapshotSchedulerdoes not affect theSnapshotSetobjects that have been created as a result of theSnapshotSchedulerhaving runRemove-XIOSnapshotSet: this deletes theSnapshotobjects that were in theSnapshotSet, tooRemove-XIOVolume:- Can be used to remove both
VolumeandSnapshotobjects - If the
Volume/Snapshotis part ofLunMap: the attempt to remove theVolume/Snapshotwill fail; more detail: this action fails in the admin GUI, but the API allows it (it removes theLunMap, too); this cmdlet is written to emulate the behavior established by the GUI (the cmdlet does not delete the targetVolume/Snapshotobject if it is part of aLunMap-- user must first remove givenLunMap) - If the
Volume/Snapshotis the subject of aSnapshotScheduler: the attempt to remove theVolume/Snapshotwill fail -- user must first remove givenSnapshotScheduler - If the
Snapshotis part of aSnapshotSet: removing theSnapshotleaves theSnapshotSetalone unless this was the lastSnapshotin theSnapshotSet - If it is the last
Snapshotin theSnapshotSet: the XMS deletes the then-emptySnapshotSet, too - If this
Volume/Snapshothas any childSnapshot: Those childSnapshotobjects'AncestorVolumevalue is set to the value of this property of theVolume/Snapshotbeing deleted, if any (else, the property on the childSnapshotgets set to$null); and, then, if all of the ancestorVolumeobjects of the givenSnapshotare deleted, theSnapshotobject becomes just aVolumeobject, no longer aSnapshotobject (though, it remains a part of aSnapshotSetobject!)
- Can be used to remove both