Managing a NetApp filer from Powershell

Have some NetApps? Want to manage them remotely with Powershell? Upset by the shocking level of documentation? Read on for some common uses:

If you have your devices domain joined and use a separate account to your desktop login to manage them you’ll need to supply a separate set of credentials:

Connect-NaController -name netapp1 -Credential (Get-Credential) -HTTPS

Create a new volume
Create a new thin provisioned (space reservation=none) volume in an aggregate:

New-NaVol -name testvol1 -Aggregate aggr1 -SpaceReserve none -size 1tb
Create a new QTree, lookup a QTree
Create, manage the option on and lookup a QTree:
New-NaQtree -Path /vol/vol1/homedirs10GBquota01
Set-NaQtree -Path /vol/vol1/homedirs10GBquota01 -OpLocks enabled -SecurityStyle mixed
Get-NAQtree -VolumeName vol1
Create a quota
Add a user quota and lookup quotas set on a QTree. Note the strange syntax for -Volume (it is the volume’s name not full path (/vol/vol1 etc). Also remember that NetApp’s idea of what constitutes a gigabyte is different to everyone else’s so you may want to specify in megabytes instead.
Add-NaQuota -Volume vol1 -Qtree homedirs10GBquota01 -Type user -Target * -DiskLimit 10g
Get-NaQuota -Volume vol1 -Qtree homedirs8GBquota01 -Type user -Target *

Add search paths for auto home shares
List the current paths and add a new one. Important! This command is not additive, you will need to specify any existing paths as well as your new one. This is the same as reading/updating cifs_homedir.cfg

set-nacifshomedirectory -Paths /vol/vol1/qtree1,/vol/vol1/qtree2

Add API access for a restricted subset of users to query a home directory location on the filer
If you want a small set of users to be able to view the location on the filer where it thinks a user’s home directory is, you’ll need to create a custom role with the following API access:



I’ll update with any other useful ones as I find them. I find the cmdlet namespace confusing for NetApp and a lot of commands have different switches for relatively similar things. The API access is also woefully documented.

2 thoughts on “Managing a NetApp filer from Powershell

  1. Hello Alex,

    I am wondering if you can help me or if you can point me somewhere. I am trying to configure a plugin to work in roundcube webmail (vacation messages). I know nothing about email servers. Our server runs exim with virtual users. The plugin requires a .forward file in the users home directory or a (which we don’t have because our users are virtual). There are drivers for sieve, setuid, and postfix. I know very little about all of this. Everytime I google my problem I get your info page (virtual users with exim and courier imap). I know it is a really old post (as it says at the top of the page) but I also noticed part way down you said you would discuss .forward files and vacation messages for the virtual users. Would you happen to have an old post where you set this up? Or would you know of somewhere I could get some good info on it. I am totally stuck at this point. Thanks for your time to read this and I apologize for posting this here but I didn’t know how else I could reach you. Thanks

    1. Gosh – a long time ago and I don’t think I have any of the old configs written down anywhere obvious.
      I’m pretty sure vacation responders are just a feature of Exim, either by pipelining out to the vacation binary itself or by using the internal autoreply transport (see

      Sorry not to be of much use but I think the way I used to do it as quite outdated now anyway.

Comments are closed.