This post was originally published on this siteRecently I wrote a blog post on how to authenticate and connect to Pure1 via PowerShell. You can find that here: Using ...
Here’s a quick one.
A customer asked me today how to get a list of all volumes that are “unprotected”. By this he meant all volumes that are not members of any protection group.
This is super easy with our Powershell SDK. Here’s the one-liner (assumes you have authenticated and saved the session cookie in the $FlashArray variable):
Compare-Object -ReferenceObject (Get-PfaVolumes -Array $FlashArray) -DifferenceObject (Get-PfaAllProtectedVolumes -Array $FlashArray) -Property name | Select name
Hope this helps,