Steps to reproduce
First we use windows 10 original PowerShell make file and it's hard link.
PS Z:\pd> echo "test" > h1.txt
PS Z:\pd> cmd.exe /C mklink /H hardlink_h1.txt .\h1.txt
为 hardlink_h1.txt <<===>> .\h1.txt 创建了硬链接
PS Z:\pd> ls
目录: Z:\pd
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2021/4/2 4:39 14 h1.txt
-a---- 2021/4/2 4:39 14 hardlink_h1.txt
PS Z:\pd> (Get-Item .\hardlink_h1.txt).Target
Z:\pd\h1.txt
PS Z:\pd>
It's work fine.
And we use Powershell v7.2.0-preview.4 reproduce this bug
PS Z:\pd> ls
Directory: Z:\pd
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2021/4/2 4:39 14 h1.txt
-a--- 2021/4/2 4:39 14 hardlink_h1.txt
PS Z:\pd> (Get-Item .\hardlink_h1.txt).Target
PS Z:\pd>
You can see .Target get nothing.
Expected behavior
PS Z:\pd> (Get-Item .\hardlink_h1.txt).Target
Z:\pd\h1.txt
PS Z:\pd>
Actual behavior
PS Z:\pd> (Get-Item .\hardlink_h1.txt).Target
PS Z:\pd>
Environment data
PS Z:\pd> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.0-preview.4
PSEdition Core
GitCommitId 7.2.0-preview.4
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS Z:\pd>


Steps to reproduce
First we use windows 10 original PowerShell make file and it's hard link.
It's work fine.
And we use Powershell v7.2.0-preview.4 reproduce this bug
You can see .Target get nothing.
Expected behavior
Actual behavior
Environment data