The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

WFA 2.x workflow for removing a CDOT CIFS share

dcornely1

Hello,

I've been actively creating workflows using the certified commands for creating CDOT volumes and associated CIFS share.  What I just realized is there is no command to remove a CIFS share.  I can still delete the underlying volume but that leaves behind an orphaned share.  Anyone know if this command exists somewhere that I'm missing?  Thanks.

-Dave

4 REPLIES 4

mgoddard

Hey Dave,

You're not missing anything, a remove command for CIFS Shares doesn't yet exist. I've attached one that I've created, import the attached dar and let me know how it works for you.

Kind Regards,

- Michael.

dcornely1

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.

dcornely1

Almost had it - just need to drop the -Force option so the command that works looks like this:

Remove-NcCifsShare -Name $ShareName -VserverContext $Vserver -Confirm:$False

Thank you!

mgoddard

Whoops, I exported the unfinished version! Sorry about that. Glad you found the solution.

- Michael.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public