Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
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 »
<contact info removed by moderator>
Solved! See The Solution
Hi,
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:
https://kb.netapp.com/app/answers/answer_view/a_id/1029854
Lab:
simulator:ONTAP 9.6
PSversion:4
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
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
https://community.netapp.com/t5/Network-Storage-Protocols-Articles-and-Resources/How-Symlinks-boost-productivity/ta-p/126258
Hope this helps, if not then one of our powershell expert will come back to you.
Hi,
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?
Thank
Hi,
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:
https://kb.netapp.com/app/answers/answer_view/a_id/1029854
Lab:
simulator:ONTAP 9.6
PSversion:4
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
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.
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.
Super.
thank for your time and your Help
Yes, you worded perfectly. Thanks!