NetApp uses the NetApp PowerShell SDK tools in Cmode to import Exportpolicy Rules

Source: Internet
Author: User

1) Get Export policy information:

$export _policy = Get-ncexportpolicy-name Testpolicy-vservercontext svmdes


2) Get Export rules information:

$export _rules = Get-ncexportrule-policy Testpolicy-vservercontext svmdes

Here, if you use the $export_policy variable, you can only get the rules information for Defualt policy. If you need to get the information of the rules in the custom export policy, the "-policy" parameter should be added with the name of the export policy (that is, you do not need to use the first step of the command).


3) Import the rules into another SVM by $export_rules the intermediate variables:

$export _rules | Foreach-object {new-ncexportrule-policy acadiapolicy-vservercontext svmpolicy-clientmatch $_. Clientmatch-readonlysecurityflavor Any-readwritesecurityflavor any}


Note: From the experimental results, the order of the imported rules will be the opposite of the original order.


Reference Links:

https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/ how-to-apply-an-exportpolicy-to-a-volume/m-p/105264/highlight/false#m4351



NetApp uses the NetApp PowerShell SDK tools in Cmode to import Exportpolicy Rules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.