Using the SMI-S Provider with Windows PowerShell

Microsoft Platform Guide

Audience
Public
Source Type
Documentation

Once this feature is added to the instance of Windows Server, using the SMI-S Provider is very straightforward. The first task is to register the SMI-S Provider. The PowerShell to register the provider is below. The Get-Credential will provide a dialog to enter credentials that will be used with the Register-SmisProvider cmdlet.


 PS C:\> $Creds = Get-Credential

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\> Register-SmisProvider -ConnectionUri https://10.0.0.1 -Credential $Creds

The SMI-S Provider is registered there are a few cmdlets that can be used to check the FlashArray. Using Get-StorageProvider will show that the FlashArray registered is from the Manufacturer PureStorage and it is of Type SMI-S. The Get-StorageSubSystem will retrieve details about the FlashArray’s HealthStatus, OperationalStatus and FriendlyName.


PS C:\> Get-StorageProvider

Type    Name                                                        Manufacturer
----    ----                                                        ------------
SMP     Windows Storage Management Provider                         Microsoft Corporation
SMI-S   10.0.0.1                                                    PureStorage


PS C:\> Get-StorageSubSystem

FriendlyName                HealthStatus OperationalStatus
------------                ------------ -----------------
Windows Storage on SERVER01 Healthy      OK
solutions-lab-m20-c09-29    Healthy      OK

Next is to update the cache of the PureStorage provider and associated child objects from the FlashArray.

Note:

If there are multiple storage vendors registered within the environment and DiscoveryLevel Full is used and a Manufacturer (Eg. PureStorage) is not specified this will attempt to query all registered storage providers which can be an expensive operation.


 Update-StorageProviderCache -Name 10.0.0.1 -DiscoveryLevel Full -Manufacturer PureStorage

The below screenshot illustrates the tasks being performed as indicated by the Windows PowerShell progress notifications.

Now the physical disks can be viewed from a specific storage vendor. In the below example the display shows all of the drives and details for the FlashArray//M20.


PS C:\> Get-PhysicalDisk -Manufacturer PureStorage | Format-Table -AutoSize

FriendlyName SerialNumber CanPool OperationalStatus HealthStatus Usage      Size
------------ ------------ ------- ----------------- ------------ -----      ----
CH0.BAY0     N/A          False   OK                Healthy            476.45 GB
CH0.BAY1     N/A          False   OK                Healthy            476.45 GB
CH0.BAY10    N/A          False   OK                Healthy            476.45 GB
CH0.BAY11    N/A          False   OK                Healthy            476.45 GB
CH0.BAY12    N/A          False   OK                Healthy            476.45 GB
CH0.BAY13    N/A          False   OK                Healthy            476.45 GB
CH0.BAY14    N/A          False   OK                Healthy            476.45 GB
CH0.BAY15    N/A          False   OK                Healthy            476.45 GB
CH0.BAY16    N/A          False   OK                Healthy            476.45 GB
CH0.BAY17    N/A          False   OK                Healthy            476.45 GB
CH0.BAY18    N/A          False   OK                Healthy            476.45 GB
CH0.BAY19    N/A          False   OK                Healthy            476.45 GB
CH0.BAY2     N/A          False   OK                Healthy            476.45 GB
CH0.BAY3     N/A          False   OK                Healthy            476.45 GB
CH0.BAY4     N/A          False   OK                Healthy            476.45 GB
CH0.BAY5     N/A          False   OK                Healthy            476.45 GB
CH0.BAY6     N/A          False   OK                Healthy            476.45 GB
CH0.BAY7     N/A          False   OK                Healthy            476.45 GB
CH0.BAY8     N/A          False   OK                Healthy            476.45 GB
CH0.BAY9     N/A          False   OK                Healthy            476.45 GB
CH0.NVB0     N/A          False   OK                Healthy                 7 GB
CH0.NVB1     N/A          False   OK                Healthy                 7 GB

The last example to show is how to provision a new volume. The name of the volume is SMIS-VOL and will be 2 TB in size. Along with showing how to create a new volume the Web Management interface shows that the volume has been created and ready for use.


 PS C:\> New-StorageSubsystemVirtualDisk -StorageSubSystemFriendlyName solutions-lab-m20-c09-29 -FriendlyName 'VOLUME01' -Size 2.5TB

FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach   Size
------------ --------------------- ----------------- ------------ --------------   ----
VOLUME01                           OK                Healthy                     2.5 TB

The below screenshot of the FlashArray management interface shows the new volume, VOLUME01, has been created.

The final task is to unregister the SMI-S provider.


 Unregister-SmisProvider -ConnectionUri https://10.0.0.1