Use the lastest PowerShell to create a symbolic link folder:
New-Item -ItemType Directory .\a
New-Item .\a\t.txt -Value "hello"
New-Item -ItemType SymbolicLink -Name .\d -Value .\a
# The Mode property is empty in the result of above cmdlet
Get-ItemPropertyValue .\d -Name Mode
# Get-ItemPropertyValue : Exception getting "Mode": "句柄无效。"
# My OS language is Chinese, "句柄无效" means "invalid handler"
The big problem is that the symbolic link d created above can't be opened. When using the system default PowerShell(PowerShell 5.1, My OS is Windows 10 x64) to create a symbolic link folder, it works well. Another question, now use the lastest PowerShell to remove the symbolic link that is created by the system default PowerShell
> Remove-Item .\d -Recurse
# Remove-Item : F:\test\test-powershell\Symlink\d is an NTFS junction point. Use the Force parameter to delete or modify this object.
It says "d is an NTFS junction point", well, d is a symbolic link,isn't it?
> $PSVersionTable
Name Value
---- -----
SerializationVersion 1.1.0.1
BuildVersion 3.0.0.0
WSManStackVersion 3.0
GitCommitId v6.0.0-alpha.14
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
CLRVersion
PSRemotingProtocolVersion 2.3
PSVersion 6.0.0-alpha
Use the lastest PowerShell to create a symbolic link folder:
The big problem is that the symbolic link
dcreated above can't be opened. When using the system default PowerShell(PowerShell 5.1, My OS is Windows 10 x64) to create a symbolic link folder, it works well. Another question, now use the lastest PowerShell to remove the symbolic link that is created by the system default PowerShellIt says "d is an NTFS junction point", well,
dis a symbolic link,isn't it?