[Netapp Powershell Toolkit] Assigning an export-policy

[ Edited ]

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.

Re: [Netapp Powershell Toolkit] Assigning an export-policy

Hi @Nick_Talbot,


You probably found that post.

It is basically all in there:


1. Connect to a controller:


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:


- POLICY_NAME (3 times)

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




I hope that helps.