Thanks Michael. I just imported the command but I'm getting the following error, which I suspect is because the cluster requires confirmation of the action:
12:51:09.806 ERROR [Remove CIFS share] Failed executing command. Exception: Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
I found this message with something similar:
https://communities.netapp.com/message/98355#98355
I don't have much Powershell experience but I think the current code that looks like this:
Remove-NcCifsShare -Name $ShareName -VserverContext $Vserver
Might need to look like this based on the code from another command for CDOT:
Remove-NcCifsShare -Name $ShareName -VserverContext $Vserver -Force -Confirm:$False
I'll test and see if it works.