ONTAP Discussions

[Netapp Powershell Toolkit] Assigning an export-policy

Nick_Talbot

I'm having a hard time figuring out how to apply an export-policy to a volume using the netapp powershell toolkit.  Does anyone have a good example of how to do this?  I saw another thread on this subject on these forums but it didn't make it very clear to me.

1 REPLY 1

wronald

Hi @Nick_Talbot,

 

You probably found that post.

It is basically all in there:

 

1. Connect to a controller:

Connect-NcController

2. Create your policy and rule:

New-NcExportPolicy -VserverContext SVM_NAME -Name POLICY_NAME 

New-NcExportRule -VserverContext SVM_NAME -Policy POLICY_NAME -ClientMatch HOSTS

3. Apply the policy to the Volume:

update-ncvol -query @{name="VOL_NAME"} -Attributes @{volumeexportattributes=@{policy="POLICY_NAME"}}

 

You will need to change the follwing information:

- SVM_NAME

- POLICY_NAME (3 times)

- HOSTS (the client match is either a client or a range of IPs, or a subnet)

- VOL_NAME

 

 

I hope that helps.

 

Cheers,

Ron.

 

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.

Public