So I'm trying to create links with relative path with PowerShell, but I don't know why I'm getting differents results, I'm quite new with the command line in Windows, sorry if this is a dumb question. Here are some results I got:
C:\Windows\system32>cd /d D:\test\directory
D:\test\directory>mklink testlink ..\test.txt
symbolic link created for testlink <<===>> ..\test.txt
PS D:\test\directory> New-Item -ItemType SymbolicLink -Path .\testlinkpowershell -Target ..\test.txt
D:\test\directory>dir
01/05/2020 10:57 AM <SYMLINK> testlink [..\test.txt]
01/05/2020 10:59 AM <SYMLINK> testlinkpowershell [D:\test\test.txt]
The main problem is that if the letter of the drive changes the symbolic links won't work, but if I use mklink it works like a charm. I know that I could just use mklink but I want to know why it does not work in PowerShell.