Hey there, there is no native function in the Powershell Module atm. You have todo it via API. This is how I do it:
$VOLUMEURL = "https://NETAPPURL/api/storage/volumes/VOLUMEUUID/snapshots/SNAPSHOTUUID"
$RESPONSE = Invoke-RestMethod -Uri $VOLUMEURL -Method GET -Credential (Get-Credential) -SkipHeaderValidation -ErrorAction Stop -SkipCertificateCheck
$PAYLOAD = @{
"snaplock_expiry_time" = "2069-06-04T19:00:00+00:00" #Edit this to the desired expiration
} | ConvertTo-Json
$RESPONSE = Invoke-RestMethod -Uri $VOLUMEURL -Method Patch -Body $PAYLOAD -Credential (Get-Credential) -SkipHeaderValidation -ErrorAction Stop -SkipCertificateCheck
$RESPONSE = Invoke-RestMethod -Uri $VOLUMEURL -Method GET -Credential (Get-Credential) -SkipHeaderValidation -ErrorAction Stop -SkipCertificateCheck
Please refer to the post I did prior to this:
https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Why-doesn-t-Set-NcSnapshotSnaplockExpTime-set-the-snapshot-snaplock-expiry/m-p/44...
Best regards
Kai