Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody
I try to create a script that shows all volumes and the encryption details. Currently I'm using the following command:
get-NcVol | select vserver, name, aggregate, encrypt
I couldn't figure out how to display the "encryption-state" (something like: vol show -volume * -fields encrypt, encryption-state). Does anybody have an idea how to get this data?
I'm using Ontap 9.5 and PowerShell Toolkit 9.6.
Solved! See The Solution
1 ACCEPTED SOLUTION
ibkl4 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like the "volume-encryption-get-iter" API was removed in newer versions of the ONTAPI for some reason, which I believe is the reason that error is generated.
Here is ONTAPI v1.130 (an older version):
And here is ONTAPI v.1.160 (a newer version - notice how the API doesn't exist. I checked the cluster-level API too, not there either):
I haven't been able to find an alternative way to get the data other than using the "Invoke-NcSsh" command to run the ONTAP CLI commands manually. Hopefully it can be fixed in future versions.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "Status" property from the "Get-NcVolumeEncryption" cmdlet looks like what you are looking for; unfortunately, I'm not able to confirm that 100% because the couple machines running the PSTK 9.6 that I've tried to run the command on complain that they aren't able to find the necessary API to run the command, but hopefully you'll have better luck than I did. 🙂
ibkl4 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like the "volume-encryption-get-iter" API was removed in newer versions of the ONTAPI for some reason, which I believe is the reason that error is generated.
Here is ONTAPI v1.130 (an older version):
And here is ONTAPI v.1.160 (a newer version - notice how the API doesn't exist. I checked the cluster-level API too, not there either):
I haven't been able to find an alternative way to get the data other than using the "Invoke-NcSsh" command to run the ONTAP CLI commands manually. Hopefully it can be fixed in future versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a solution:
Get-NcVol | Select-Object -Property vserver,name,aggregate,state,@{Label = "Node"; expression = {$_.VolumeIdAttributes.Node}},encrypt,@{Label = "encryption-state"; expression = {(Get-NcVolumeEncryptionConversion -Vserver $_.vserver -Volume $_.name).status}}
