Microsoft Virtualization Discussions


PowerShell Toolkit ;error with New-NcSym

Dear all, 


Customer is reporting an issue with PowerShell Toolkit when trying to create a new symlink.

Actually, he is stuck on a big project so any fast help would be very appreciated.


Target File « test.txt »

  • The target file is seen by powershell1.png2.png
  • Exécution on the command New-NcSymLink with issue3.png


  • You have executed this command without « /vol » on traget or symlink but without success.
  • The symlink file « test2.txt » is created but symlink is not functional.






<contact info removed by moderator>


Re: PowerShell Toolkit ;error with New-NcSym

Please look at the example given in this blog: [Very well written]


I think the order and syntax needs correction.


Go to this section:
How we create some Symlinks with PowerShell

Hope this helps, if not then one of our powershell expert will come back to you.


Re: PowerShell Toolkit ;error with New-NcSym


We saw this article.
But that does not correspond to the need. We try to create a symlink to a file by mounting a CIFS folder.
The New-NcSymlink command only needs two parameters: Symlink and Path.
when we return this command we have an error "No such file or Directory". This creates a file but does not point to anything.
Is it a problem configuring the netAPP cluster or the Powershell version 9.6 toolkit?

Can you give an example of a command to test?




Re: PowerShell Toolkit ;error with New-NcSym



I followed this KB article, and it worked perfectly in my lab. Screenshot attached.


How to create a symbolic link in clustered Data ONTAP without the need for NFS:

simulator:ONTAP 9.6



Note: Original & symlink file need not exist prior, first will be created during command-line execution, and test_copy will be created automatically.
symlink: test_copy
original: test

View solution in original post


Re: PowerShell Toolkit ;error with New-NcSym

Thank you for your time.
I do not understand. If Original and symlink file does not exist how can you create a symlink to an existing file?
I also tested :
   - My vServer : BISPNASN4003
   - My ShareName: VDISK1
I try to create a symlink file "Symlink.txt" that  point to "Target.txt"  :
  - First command
   Add-NcCifsSymlink –unixpath /Target.txt/ -cifspath /Symlink.txt/ -locality local –sharename VDISK1
  - Second command
   New-NcSymlink –target /Target.txt –linkname /vol/BISPNASN4003_01/VDISK1/Symlink.txt
II do not see a file "Target.txt"

Re: PowerShell Toolkit ;error with New-NcSym

My wording may have confused you. But, what I'm  trying to say is, I created a file 'test' and sym linked to  'test_copy' which is actually a symlink created by the first command. Target  is simply does not have to exist.

Its mentioned in the article : The '-target is a path or location that does not have to exist. The target path is not checked for validity.
'Test' will create a symlink that points to a non-existent path of /somewhere 
 and the symbolic link itself will be created in the shared folder, in my case qtree_cifs.
I have tried it 3 times, and it worked for me.

Re: PowerShell Toolkit ;error with New-NcSym

OK, thanks. I understood. The first command creates a symlink object that points to the target. The second command creates the file that points to the created symlink.


thank for your time and your Help


Re: PowerShell Toolkit ;error with New-NcSym

Yes,  you worded perfectly. Thanks!

Check out the KB!
Knowledge Base
All Community Forums