Access FlashArray using the Pure Storage PowerShell SDK

In the latest release of the PowerShell SDK (1.7.4.0) we included a new cmdlet for sending CLI commands to the FlashArray. We added this cmdlet in case any new REST APIs had not been integrated into the PowerShell SDK and customers/partners wanted to access a direct CLI command. You can pass a CLI command and we establish the SSH session, execute the command and then return the results as a PSObject.

Example

New-PfaCLICommand -EndPoint 10.1.1.1 -Credentials $creds -CommandText "purevol list" 

Output

PS C:\Windows\system32> New-PfaCLICommand -EndPoint 10.1.1.1 -Credentials $creds -CommandText "purevol list"

Name             Size  Source  Created                  Serial                  
boneyard3        6T    -       2016-12-21 16:35:39 PST  45084F3508BF46140001192C
CSV-Cluster01    5T    -       2016-11-12 07:02:45 PST  45084F3508BF461400011671
PSRepository     250G  -       2016-11-02 09:21:05 PDT  45084F3508BF4614000111A7
SCVMM-Library01  2T    -       2016-10-25 13:54:22 PDT  45084F3508BF461400011036
Server01-Vol01   250G  -       2016-12-21 16:37:49 PST  45084F3508BF46140001192D
Server01-Vol02   250G  -       2017-02-06 13:38:44 PST  45084F3508BF461400011934
Server02-Vol01   250G  -       2016-11-12 07:23:05 PST  45084F3508BF461400011672
Server03-Vol01   250G  -       2016-12-21 16:38:03 PST  45084F3508BF46140001192E
Server04-Vol01   250G  -       2016-12-21 16:38:17 PST  45084F3508BF46140001192F
Server05-Vol01   250G  -       2016-12-21 16:38:26 PST  45084F3508BF461400011930
Server06-Vol01   250G  -       2016-11-12 07:23:16 PST  45084F3508BF461400011673
Server07-Vol01   250G  -       2016-12-21 16:38:34 PST  45084F3508BF461400011931
Server08-Vol01   250G  -       2016-12-21 16:38:42 PST  45084F3508BF461400011932

Now for the cool “side effect” you can use the very same cmdlet to access a FlashBlade! Below is a simple example of querying information from the FlashBlade.

Example1

$creds = Get-Credential
New-PfaCLICommand -EndPoint 10.1.1.1 -Credentials $creds -CommandText 'pureblade list'

Output Example1

Name      Status   Capacity  Details
CH1.FB1   healthy  8.00T     -
CH1.FB2   healthy  8.00T     -
CH1.FB3   healthy  8.00T     -
CH1.FB4   healthy  8.00T     -
CH1.FB5   healthy  8.00T     -
CH1.FB6   healthy  8.00T     -
CH1.FB7   healthy  8.00T     -
CH1.FB8   healthy  8.00T     -
CH1.FB9   healthy  8.00T     -
CH1.FB10  healthy  8.00T     -
CH1.FB11  healthy  8.00T     -
CH1.FB12  healthy  8.00T     -
CH1.FB13  healthy  8.00T     -
CH1.FB14  healthy  8.00T     -
CH1.FB15  healthy  8.00T     -

Example2


$creds = Get-Credential
New-PfaCLICommand -EndPoint 10.1.1.1 -Credentials $creds -CommandText 'purefs list'

Output Example2

Name          Size  Used     % Used  Created                  Protocols  Rules                 Fast Remove
 agfa01        10T   572.21G  6%      2017-03-31 18:22:19 PDT  nfs        *(rw,no_root_squash)  True
 ArchLog       10T   23.03G   0%      2017-03-30 18:46:23 PDT  nfs        *(rw,no_root_squash)  False
 cv_ddb01      2T    0.00     0%      2017-03-23 10:38:11 PDT  nfs        *(rw,no_root_squash)  True
 cv_media01    25T   5.27T    21%     2017-03-23 10:36:38 PDT  nfs        *(rw,no_root_squash)  True
 cv_media02    25T   3.12T    12%     2017-03-23 10:37:01 PDT  nfs        *(rw,no_root_squash)  True
 cv_media03    20T   1.07T    5%      2017-04-24 15:43:48 PDT  nfs        *(rw,no_root_squash)  False
 cv_media04    20T   1.00T    5%      2017-04-24 15:43:58 PDT  nfs        *(rw,no_root_squash)  False
 data01        10G   4.00G    40%     2017-02-28 15:09:46 PST  nfs        *(rw,no_root_squash)  False
 DataVol01     10T   5.75T    56%     2017-01-22 20:39:06 PST  nfs        *(rw,no_root_squash)  False
 DataVol02     10T   5.75T    56%     2017-01-22 21:30:29 PST  nfs        *(rw,no_root_squash)  False
 DataVol03     10T   5.75T    56%     2017-01-22 21:30:49 PST  nfs        *(rw,no_root_squash)  False
 DataVol04     10T   5.75T    56%     2017-01-22 21:31:35 PST  nfs        *(rw,no_root_squash)  False

Hopefully this opens us some automation scenarios for those FlashBlade customers.

Thanks,
Barkz


			
4 comments

Add Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

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