2012-02-09 02:26 AM - last edited on 2014-09-26 11:18 AM by alissa
Here's a Powershell script that allows reading and setting qtree-based quotas based on a UNC (can also be a DFS path!).
I wrote this script for a customer who is looking to delegate CIFS administration as much as possible to Windows admins through the use of vFilers, and the ability to see and set a quota on a qtree was raised as very important. Quota entries are expected to be already present, the script is only meant to update an existing quota.
The biggest problem was that Windows admins are working with DFS, thus they don't know on which vFiler (physical path) a qtree is. So the script is able to perform a DFS referral query to get the physical UNC path, then the qtree path and the quota can be obtained by requesting the info to the vFiler.
To make the script run, ManageOntap.dll should be in the same folder as the 2 files. A role with the following capabilities is required on each Filer/vFiler:
Script assumes an RPC authentication but parameter "-InteractiveLogin" will allow using "user/password" path instead.
Any comments/questions welcome!