<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota) in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9277#M450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When dealing with vfiler you have two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) In the initial Connect-NaController simply connect to the hosted vfiler and not hosting filer (vfiler0)&lt;/P&gt;&lt;P&gt;2) In the initial Connect-NaController connect to the hosting filer (vfiler0) and use the -vfiler &amp;lt;vfilername&amp;gt; parameter to tunnel commands to the hosted vfiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing is needed in each cmdlet; it's selected during the connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2011 12:54:47 GMT</pubDate>
    <dc:creator>madden</dc:creator>
    <dc:date>2011-03-31T12:54:47Z</dc:date>
    <item>
      <title>Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9266#M448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking to the easiest way to allow our operations team to manage CIFS shares in a vfiler.&amp;nbsp; The basic tasks would be:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create/rename/destroy qtree&lt;/LI&gt;&lt;LI&gt;Create/modify/destroy quota, re-init quotas after changes&lt;/LI&gt;&lt;LI&gt;Create/rename/destroy share share&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately System Manager doesn't support vfiler for these tasks, so although we can use native windows MMC for share management the qtree and quota tasks have no native GUI.&amp;nbsp; I checked the available PowerShell cmdlets and they seem to include enough for the tasks above so that might be the easiest route if developing from scratch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any sample scripts they (or the operations team) uses to provision new CIFS storage requests?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp; Provisioning Manager is out of scope; so although it might be able to do some of the above we're not interested in using it in the flow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:57:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9266#M448</guid>
      <dc:creator>madden</dc:creator>
      <dc:date>2025-06-05T06:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9272#M449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PS&amp;gt; Get-Command add-nacifsshare -syntax&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add-NaCifsShare [-Share] &amp;lt;String&amp;gt; [-Path] &amp;lt;String&amp;gt; [-Comment &amp;lt;String&amp;gt;] [-MaxUsers &amp;lt;Nullable`1&amp;gt;] [-Group &amp;lt;String&amp;gt;] [-Widelink &amp;lt;Nullable`1&amp;gt;] [-SymlinkStrictSecurity &amp;lt;Nullable`1&amp;gt;] [-VirusScan &amp;lt;Nullable`1&amp;gt;] [-VirusScanRead &amp;lt;Nullable`1&amp;gt;] [-Browse &amp;lt;Nullable`1&amp;gt;] [-Umask &amp;lt;Nullable`1&amp;gt;] [-DirectoryUmask &amp;lt;Nullable`1&amp;gt;] [-FileUmask &amp;lt;Nullable`1&amp;gt;] [-Caching &amp;lt;String&amp;gt;] [-Controller &amp;lt;NaController&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the thing that's missing here is vfiler context&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone explain how we're supposed to reference CIFS shares on vfilers ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 05:49:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9272#M449</guid>
      <dc:creator>pwl</dc:creator>
      <dc:date>2011-03-31T05:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9277#M450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When dealing with vfiler you have two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) In the initial Connect-NaController simply connect to the hosted vfiler and not hosting filer (vfiler0)&lt;/P&gt;&lt;P&gt;2) In the initial Connect-NaController connect to the hosting filer (vfiler0) and use the -vfiler &amp;lt;vfilername&amp;gt; parameter to tunnel commands to the hosted vfiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing is needed in each cmdlet; it's selected during the connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 12:54:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9277#M450</guid>
      <dc:creator>madden</dc:creator>
      <dc:date>2011-03-31T12:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9281#M451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok So I know this has been opened a long time ago but I have a solution I have created this script to work in powershell and it creates the qtree in a volume ands the quota and ntfs permissions and then will add an email owner for you in dfm. I am not a powershell or script guru by no means but it gets the job done. If anyone has any suggested improvements please share.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;############################################################################################################&lt;/P&gt;&lt;P&gt;#Add Data Ontap Module&lt;/P&gt;&lt;P&gt;Import-Module Dataontap&lt;/P&gt;&lt;P&gt;#Set variable for controllers&lt;/P&gt;&lt;P&gt;$vfl01 = Connect-NaController vfiler-01&lt;/P&gt;&lt;P&gt;#Set variables for new creations (This will be for the new qtree and quota to be set THIS WILL ALWAYS NEED TO BE EDITED)&lt;/P&gt;&lt;P&gt;#quota size can be done in G =GB M = MB K =KB&lt;/P&gt;&lt;P&gt;#####################################################&lt;/P&gt;&lt;P&gt;$vfiler = $vfl01 &lt;/P&gt;&lt;P&gt;$vol = "volumename"&lt;/P&gt;&lt;P&gt;$qtree = "qtreename"&lt;/P&gt;&lt;P&gt;$quotasize = "20G"&lt;/P&gt;&lt;P&gt;$quotalimit = "20G"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$quotaemail = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:email@company.com" target="_blank"&gt;email@company.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#####################################################&lt;/P&gt;&lt;P&gt;#Create new qtree&lt;/P&gt;&lt;P&gt;New-NaQtree /vol/$vol/$qtree -Controller $vfiler &lt;/P&gt;&lt;P&gt;#Disable quotas for volume&lt;/P&gt;&lt;P&gt;Disable-NaVolQuota $vol -Controller $vfiler &lt;/P&gt;&lt;P&gt;#Adds quota to the qtree&lt;/P&gt;&lt;P&gt;add-NaQuota tree /vol/$vol/$qtree $vol -DiskLimit $quotasize -Threshold $quotalimit -Controller $vfiler &lt;/P&gt;&lt;P&gt;#Enables quotas on volume&lt;/P&gt;&lt;P&gt;Enable-NaVolQuota $vol -Controller $vfiler &lt;/P&gt;&lt;P&gt;#Add NTFS Permissions to share folder&lt;/P&gt;&lt;P&gt;icacls \\$vfiler\$vol\$qtree /grant corp\$qtree:"(OI)(CI)M"&lt;/P&gt;&lt;P&gt;#Test NTFS permisiions&lt;/P&gt;&lt;P&gt;#icacls \\$vfiler\ps$\$qtree /grant corp\user:"(OI)(CI)M"&lt;/P&gt;&lt;P&gt;Write-Host "Adding QTREE owner in DFM/Operation Manager" -BackgroundColor White -ForegroundColor Black &lt;/P&gt;&lt;P&gt;sleep 135&lt;/P&gt;&lt;P&gt;#Set the qtree owner email on the dfm server&lt;/P&gt;&lt;P&gt;dfm comment set $vfiler":"/$vol/$qtree ownerEmail=$quotaemail&lt;/P&gt;&lt;P&gt;Write-Host "Share Creation is complete Please copy and paste below into ticket" -BackgroundColor Black -ForegroundColor Yellow &lt;/P&gt;&lt;P&gt;Write-Host "Created \\$vfiler\$vol\$qtree with $quotasize Quota size" -BackgroundColor Black -ForegroundColor Yellow&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 17:56:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9281#M451</guid>
      <dc:creator>dasimpson1</dc:creator>
      <dc:date>2011-11-17T17:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9285#M452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thing to add this script is assuming you shared out the volume already so there is no share creation code in here but really simple to add in if you wanted too&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 19:04:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9285#M452</guid>
      <dc:creator>dasimpson1</dc:creator>
      <dc:date>2011-11-17T19:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script for managing typical CIFS provisioning tasks (qtree/share/quota)</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9290#M453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I've made what you are looking for... Except that my script doesn't manage Shares &amp;amp; Volume... Ony Qtree &amp;amp; Quota.&lt;/P&gt;&lt;P&gt;But that should be included in the next version&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.netapp.com/docs/DOC-23762" title="https://communities.netapp.com/docs/DOC-23762" target="_blank"&gt;PowerShell Qtree and Quota manager with Ghost Quota and Qtree Reports, all with GUI&lt;/A&gt;&lt;A _jive_internal="true" href="https://community.netapp.com/docs/DOC-23762" title="https://communities.netapp.com/docs/DOC-23762" target="_blank"&gt;https://communities.netapp.com/docs/DOC-23762&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 14:29:42 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-for-managing-typical-CIFS-provisioning-tasks-qtree-share-quota/m-p/9290#M453</guid>
      <dc:creator>museedulouvre</dc:creator>
      <dc:date>2013-03-13T14:29:42Z</dc:date>
    </item>
  </channel>
</rss>

