$Cluster="10.10.10.10";
$ShareName= "netapp";
$dirname="rutulshah";
$VolumeName="vol_home1";
$path="/"+"$VolumeName"+"/";
$Vserver="vser_cifs";
$username="admin";
$password="netapp123";
$PWord = ConvertTo-SecureString –String $password –AsPlainText -Force
$credential=New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $username, $PWord
Connect-NcController $Cluster -Credential $credential;
Add-NcCifsShare -Name $ShareName -Path $Path -VserverContext $Vserver;
New-NcDirectory /vol/vol_home1/$ShareName/xyz -Permission 0755 -Controller $global:CurrentNcController -VserverContext $Vserver
I wrote above script it is creating the folder inside share but giving error :
New-NcDirectory : No such file or directory
At line:15 char:1
+ New-NcDirectory /vol/vol_home1/$ShareName/rutulshah -Permission 0755 -Controller ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (10.63.52.69:NcController) [New-NcDirectory], EONTAPI_ENOENT
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.File.NewNcDirectory