<?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 Add-NcQuota shows Object reference not set to an instance of an object error in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111249#M4545</link>
    <description>&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After upgrading to NetApp PowerShell Toolkit 4.0 (DataONTAP PowerShell Toolkit 3.3), I have been experiencing some strange behavior when using the cmdlet Add-NcQuota.&lt;/P&gt;&lt;P&gt;For example, when executing the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Add-NcQuota -path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM"&lt;/PRE&gt;&lt;P&gt;The following error message is displayed :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Add-NcQuota :Object reference not set to an instance of an object.
At line:1 character:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
    + FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the quota is still&amp;nbsp;applied correctly to the specified path.&lt;/P&gt;&lt;P&gt;I tried setting the attribute $global:CurrentNcController.TimeoutMsec to 600000 as suggested in &lt;A title="Get-NaVol : Object reference not set to an instance of an object." href="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Get-NaVol-Object-reference-not-set-to-an-instance-of-an-object/m-p/108876#U108876" target="_blank"&gt;this post&lt;/A&gt;, but the error persists.&lt;/P&gt;&lt;P&gt;We also executed &lt;FONT face="courier new,courier"&gt;Set-NaToolkitConfiguration "DEBUG"&lt;FONT face="helvetica"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt; as another user suggested and this was the output (the error is localized to pt-BR):&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;PS D:\repository\powershell&amp;gt; Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
2015-10-15 18:24:12,707 INFO  DataONTAP.C.PowerShell.SDK.NcControllerCmdlet - Cmdlet invocation: Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
MODO DETALHADO: Adding new tree quota.
2015-10-15 18:24:12,713 DEBUG NetApp.Ontapi.NaServer - &amp;lt;netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' vfiler='SVM'&amp;gt;&amp;lt;quota-add-entry&amp;gt;
  &amp;lt;disk-limit&amp;gt;204800&amp;lt;/disk-limit&amp;gt;
  &amp;lt;file-limit&amp;gt;-&amp;lt;/file-limit&amp;gt;
  &amp;lt;qtree /&amp;gt;
  &amp;lt;quota-target&amp;gt;/vol/CIFS_TESTE/teste_quota_2&amp;lt;/quota-target&amp;gt;
  &amp;lt;quota-type&amp;gt;tree&amp;lt;/quota-type&amp;gt;
  &amp;lt;soft-disk-limit&amp;gt;-&amp;lt;/soft-disk-limit&amp;gt;
  &amp;lt;soft-file-limit&amp;gt;-&amp;lt;/soft-file-limit&amp;gt;
  &amp;lt;threshold&amp;gt;-&amp;lt;/threshold&amp;gt;
  &amp;lt;volume&amp;gt;CIFS_TESTE&amp;lt;/volume&amp;gt;
&amp;lt;/quota-add-entry&amp;gt;&amp;lt;/netapp&amp;gt;

2015-10-15 18:24:12,852 DEBUG NetApp.Ontapi.NaServer - &amp;lt;results status="passed"/&amp;gt;
2015-10-15 18:24:12,853 DEBUG NetApp.Ontapi.NaServer - &amp;lt;netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' v
filer='SVM'&amp;gt;&amp;lt;quota-get-entry&amp;gt;
  &amp;lt;qtree /&amp;gt;
  &amp;lt;quota-target&amp;gt;/vol/CIFS_TESTE/teste_quota_2&amp;lt;/quota-target&amp;gt;
  &amp;lt;quota-type&amp;gt;tree&amp;lt;/quota-type&amp;gt;
  &amp;lt;volume&amp;gt;CIFS_TESTE&amp;lt;/volume&amp;gt;
&amp;lt;/quota-get-entry&amp;gt;&amp;lt;/netapp&amp;gt;

2015-10-15 18:24:12,898 DEBUG NetApp.Ontapi.NaServer - &amp;lt;results status="passed"&amp;gt;&amp;lt;disk-limit&amp;gt;204800&amp;lt;/disk-limit&amp;gt;&amp;lt;file-lim
it&amp;gt;-&amp;lt;/file-limit&amp;gt;&amp;lt;soft-disk-limit&amp;gt;-&amp;lt;/soft-disk-limit&amp;gt;&amp;lt;soft-file-limit&amp;gt;-&amp;lt;/soft-file-limit&amp;gt;&amp;lt;threshold&amp;gt;-&amp;lt;/threshold&amp;gt;&amp;lt;/resul
ts&amp;gt;
&lt;FONT color="#FF0000"&gt;Add-NcQuota : Referência de objeto não definida para uma instância de um objeto.
No linha:1 caractere:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
    + FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;The same also occurs with the Set-NcQuota cmdlet.&lt;/P&gt;&lt;P&gt;I have seen someone suggest using the parameter &lt;FONT face="courier new,courier"&gt;-ErrorAction "SilentlyContinue"&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;, but that doesn't fix the problem, just "hides" it.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;As for the environment:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Storage: Clustered DataONTAP 8.2.1 P1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;PowerShell : 4.0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Workstation OS: Windows 7 Professional x64&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Does anybody have any clues or additional tests to suggest?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Any help will be appreciated. Thanks in advance. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 23:01:32 GMT</pubDate>
    <dc:creator>rafael-miranda</dc:creator>
    <dc:date>2025-06-04T23:01:32Z</dc:date>
    <item>
      <title>Add-NcQuota shows Object reference not set to an instance of an object error</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111249#M4545</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After upgrading to NetApp PowerShell Toolkit 4.0 (DataONTAP PowerShell Toolkit 3.3), I have been experiencing some strange behavior when using the cmdlet Add-NcQuota.&lt;/P&gt;&lt;P&gt;For example, when executing the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Add-NcQuota -path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM"&lt;/PRE&gt;&lt;P&gt;The following error message is displayed :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Add-NcQuota :Object reference not set to an instance of an object.
At line:1 character:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
    + FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the quota is still&amp;nbsp;applied correctly to the specified path.&lt;/P&gt;&lt;P&gt;I tried setting the attribute $global:CurrentNcController.TimeoutMsec to 600000 as suggested in &lt;A title="Get-NaVol : Object reference not set to an instance of an object." href="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Get-NaVol-Object-reference-not-set-to-an-instance-of-an-object/m-p/108876#U108876" target="_blank"&gt;this post&lt;/A&gt;, but the error persists.&lt;/P&gt;&lt;P&gt;We also executed &lt;FONT face="courier new,courier"&gt;Set-NaToolkitConfiguration "DEBUG"&lt;FONT face="helvetica"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt; as another user suggested and this was the output (the error is localized to pt-BR):&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;PS D:\repository\powershell&amp;gt; Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
2015-10-15 18:24:12,707 INFO  DataONTAP.C.PowerShell.SDK.NcControllerCmdlet - Cmdlet invocation: Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
MODO DETALHADO: Adding new tree quota.
2015-10-15 18:24:12,713 DEBUG NetApp.Ontapi.NaServer - &amp;lt;netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' vfiler='SVM'&amp;gt;&amp;lt;quota-add-entry&amp;gt;
  &amp;lt;disk-limit&amp;gt;204800&amp;lt;/disk-limit&amp;gt;
  &amp;lt;file-limit&amp;gt;-&amp;lt;/file-limit&amp;gt;
  &amp;lt;qtree /&amp;gt;
  &amp;lt;quota-target&amp;gt;/vol/CIFS_TESTE/teste_quota_2&amp;lt;/quota-target&amp;gt;
  &amp;lt;quota-type&amp;gt;tree&amp;lt;/quota-type&amp;gt;
  &amp;lt;soft-disk-limit&amp;gt;-&amp;lt;/soft-disk-limit&amp;gt;
  &amp;lt;soft-file-limit&amp;gt;-&amp;lt;/soft-file-limit&amp;gt;
  &amp;lt;threshold&amp;gt;-&amp;lt;/threshold&amp;gt;
  &amp;lt;volume&amp;gt;CIFS_TESTE&amp;lt;/volume&amp;gt;
&amp;lt;/quota-add-entry&amp;gt;&amp;lt;/netapp&amp;gt;

2015-10-15 18:24:12,852 DEBUG NetApp.Ontapi.NaServer - &amp;lt;results status="passed"/&amp;gt;
2015-10-15 18:24:12,853 DEBUG NetApp.Ontapi.NaServer - &amp;lt;netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' v
filer='SVM'&amp;gt;&amp;lt;quota-get-entry&amp;gt;
  &amp;lt;qtree /&amp;gt;
  &amp;lt;quota-target&amp;gt;/vol/CIFS_TESTE/teste_quota_2&amp;lt;/quota-target&amp;gt;
  &amp;lt;quota-type&amp;gt;tree&amp;lt;/quota-type&amp;gt;
  &amp;lt;volume&amp;gt;CIFS_TESTE&amp;lt;/volume&amp;gt;
&amp;lt;/quota-get-entry&amp;gt;&amp;lt;/netapp&amp;gt;

2015-10-15 18:24:12,898 DEBUG NetApp.Ontapi.NaServer - &amp;lt;results status="passed"&amp;gt;&amp;lt;disk-limit&amp;gt;204800&amp;lt;/disk-limit&amp;gt;&amp;lt;file-lim
it&amp;gt;-&amp;lt;/file-limit&amp;gt;&amp;lt;soft-disk-limit&amp;gt;-&amp;lt;/soft-disk-limit&amp;gt;&amp;lt;soft-file-limit&amp;gt;-&amp;lt;/soft-file-limit&amp;gt;&amp;lt;threshold&amp;gt;-&amp;lt;/threshold&amp;gt;&amp;lt;/resul
ts&amp;gt;
&lt;FONT color="#FF0000"&gt;Add-NcQuota : Referência de objeto não definida para uma instância de um objeto.
No linha:1 caractere:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
    + FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;The same also occurs with the Set-NcQuota cmdlet.&lt;/P&gt;&lt;P&gt;I have seen someone suggest using the parameter &lt;FONT face="courier new,courier"&gt;-ErrorAction "SilentlyContinue"&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;, but that doesn't fix the problem, just "hides" it.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;As for the environment:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Storage: Clustered DataONTAP 8.2.1 P1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;PowerShell : 4.0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Workstation OS: Windows 7 Professional x64&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Does anybody have any clues or additional tests to suggest?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Any help will be appreciated. Thanks in advance. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 23:01:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111249#M4545</guid>
      <dc:creator>rafael-miranda</dc:creator>
      <dc:date>2025-06-04T23:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add-NcQuota shows Object reference not set to an instance of an object error</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111484#M4553</link>
      <description>&lt;P&gt;Thank you for all the thorough details. &amp;nbsp;It looks like indeed you uncovered an issue with the 3.3 Toolkit. &amp;nbsp;The tracking bug for the fix is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mysupport.netapp.com/NOW/cgi-bin/bol?Type=Detail&amp;amp;Display=934517" target="_self"&gt;http://mysupport.netapp.com/NOW/cgi-bin/bol?Type=Detail&amp;amp;Display=934517&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround is under review and I have asked for it to be made public quickly. &amp;nbsp;If you subscribe to that bug report through the "watch this bug" link at the bottom you will get notified when it is updated.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 14:57:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111484#M4553</guid>
      <dc:creator>mcgue</dc:creator>
      <dc:date>2015-10-21T14:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add-NcQuota shows Object reference not set to an instance of an object error</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111509#M4554</link>
      <description>&lt;P&gt;Thanks for your reply, mcgue. I'll watch the updates on the bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found an alternative for creating quotas using the Invoke-NcSsh with the cDot command.&lt;/P&gt;&lt;P&gt;The equivalent command for the one in the opening post is:&lt;/P&gt;&lt;PRE&gt;Invoke-NcSsh -Command 'volume quota policy rule create -vserver SVM -policy-name default -type tree -volume CIFS_TESTE -qtree "" -target "teste_quota_2" -disk-limit 200MB'&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Oct 2015 18:17:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/111509#M4554</guid>
      <dc:creator>rafael-miranda</dc:creator>
      <dc:date>2015-10-21T18:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add-NcQuota shows Object reference not set to an instance of an object error</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/124237#M5102</link>
      <description>&lt;P&gt;The message "Object not set to instance of Object" means that you are trying to use an object which has not been initialized. That is, you either set it to null, or you never set it to anything at all. The runtime throwing a &lt;A href="http://net-informations.com/q/faq/null.html" target="_self"&gt;NullReferenceException&lt;/A&gt; always means the same thing: you are trying to use a reference. The reference is not initialized (or it was initialized, but is no longer initialized).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 07:31:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Add-NcQuota-shows-Object-reference-not-set-to-an-instance-of-an-object-error/m-p/124237#M5102</guid>
      <dc:creator>antoniosarco</dc:creator>
      <dc:date>2016-10-17T07:31:38Z</dc:date>
    </item>
  </channel>
</rss>

