NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

Creating Qtree using Powershell Module

NickCIRC
2,068 Views

Dear all,

I trying to user the powershell module "NetApp.ONTAP"  to create Qtree on an AFFC800, I believe this module calling API but I am not sure. 

Anyway, the things, I am able to create a qtree using the command below :
PS > new-NcQtree -VserverContext vs-dc1-sandbox -Volume vs_dc1_sandbox_flexgroup_project -Qtree 140225_Test -SecurityStyle unix -Mode "0750"

However I need to specify the group (from active directoy) and if I do it fails with the error below
PS > new-NcQtree -VserverContext vs-dc1-sandbox -Volume vs_dc1_sandbox_flexgroup_project -Qtree 140225_Test -SecurityStyle unix -Mode "0750" -Group "acl_m"
## New-NcQtree : Cannot bind parameter 'Group'. Cannot convert the "acl_m" value of type "System.String" to type "DataONTAP.C.Types.Qtree.Group".
At line:1 char:137
+ ... t -Qtree 140225_Test -SecurityStyle unix -Mode "0750" -Group "acl_m"

I look up the web and I did not manage to find a solution to pass the group with the right type etc... 
The AD group association with Qtree works well when creating using the CLI or the web interface.

  Many thanks in advance for your help.
Nicolas

1 REPLY 1

AmitKerkar
1,733 Views

$mygroup = Get-NcGroup -VserverContext vs-dc1-sandbox -Name "acl_m"

 

you need to use the returned value. your "acl_m" isn't the correct type

Public