Microsoft Virtualization Discussions

Powershell toolkit modification

cscott
4,310 Views

Hello,

     Can we look into removing the "/vol" requirement for any and all cDOT powershell tools please?  As "/vol" is no longer required and in fact requires extra steps to create and keep in mind for mounting volumes into that junction path, this requirement needs to be removed for those customers not using "/vol" in their cDOT environments.

 

 

 

Set-NcQuota -Volume cscott_quota_test -Policy default -VserverContext svm_test -Type tree -target /cscott_quota_test/qtree1
Set-NcQuota : Invalid target /cscott_quota_test/qtree1 specified for tree quota rule.  Target for explicit tree quota rule for volume cscott_quota_test must be in "/vol/cscott_quota_test/<qtree-name>" format.
At line:1 char:1
+ Set-NcQuota -Volume cscott_quota_test -Policy default -VserverContext svm_test ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (cdtusalph81:NcController) [Set-NcQuota], EQUOTAINVALID
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.SetNcQuota

 



Set-NcQuota -Volume cscott_quota_test -Policy default -VserverContext svm_test -Type tree -target /vol/cscott_quota_test/qtree1
Set-NcQuota : Object reference not set to an instance of an object.
At line:1 char:1
+ Set-NcQuota -Volume cscott_quota_test -Policy default -VserverContext svm_test ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (cdtusalph81:NcController) [Set-NcQuota], NullReferenceException
    + FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.SetNcQuota

1 ACCEPTED SOLUTION

asulliva
4,223 Views

Hello @cscott,

 

One potential workaround would be to use the pipeline...

 

Get-NcVol $volumeName | Get-NcQuota -Type user | Set-NcQuota -DiskLimit 10gb

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

asulliva
4,224 Views

Hello @cscott,

 

One potential workaround would be to use the pipeline...

 

Get-NcVol $volumeName | Get-NcQuota -Type user | Set-NcQuota -DiskLimit 10gb

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

cscott
4,078 Views

My apologies for the late reply, other priorities pushed this out.  I have tested it successfully, thank you from myself and my customer!

 

- Scott

Public