#powershell toolkit or rest api

1 messages · Page 1 of 1 (latest)

trail garnet
#

Hi , i am building a script in powershell to delete quota policy rules from users that do not exist in ActiveDirectory anymore. I am looking for a cmdlet for deleting that users policy rules. Sombody that can help or have suggestions ? working with NetApp Release 9.9.1P15 thx.

viscid flare
#

These are important 'discovery searches/queries' to learn:

$PSVersionTable
Get-Module NetApp.ONTAP -ListAvailable | Select-Object -Property Name,Version
Get-Command -Module NetApp.ONTAP -Name Remove*quota*

PS /> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.17
PSEdition                      Core
GitCommitId                    7.2.17
OS                             Linux 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS /> Get-Module NetApp.ONTAP -ListAvailable | Select-Object -Property Name,Version

Name         Version
----         -------
NetApp.ONTAP 9.10.1.2111

PS /> Get-Command -Module NetApp.ONTAP -Name Remove*quota*

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Remove-NaQuota                                     9.10.1.21… NetApp.ONTAP
Cmdlet          Remove-NcQuota                                     9.10.1.21… NetApp.ONTAP
Cmdlet          Remove-NcQuotaPolicy                               9.10.1.21… NetApp.ONTAP

PS /> 
#

^^ That is not to say you don't know these, but I find many in the community do not know these.
Also, feel free to test stuffs in the labs:
https://labondemand.netapp.com/lab/ontap-ps-auto-hol
Note that these labs do expire and due to license boundaries, they cannot be extended, so keep your data saved outside of it. But, you can have as many labs as you want back-to-back. 🙂

trail garnet
viscid flare
#

I don't have the cycles to setup a lab to hash out the syntax.