For PowerShell 7.5 on Windows, Get-Item -LiteralPath represents a final linked item as a FileInfo or DirectoryInfo for the link path, but intermediate symbolic-link components are resolved by Windows as part of pathname lookup; the available sources do not establish a universal “target is never accessed” guarantee or the exact provider call path at commit 713e77f15f63bae9f23fb02045c7843ad6a8769b.
Final path component
The PowerShell 7.5 FileSystem-provider contract says:
- Files are returned as
System.IO.FileInfo.
- Directories are returned as
System.IO.DirectoryInfo.
- For a linked item,
Mode contains l, and LinkType identifies the link type.
- On Windows NTFS, possible
LinkType values include HardLink, SymLink, Junction, and other values.
-
AppExecLink is an explicit exception: Windows supplies neither LinkType nor LinkTarget for it. ^1^
That establishes representation of the final named item, not a complete trace of filesystem operations. In particular:
-
LinkTarget describes “the target path of the link located in FullName”; it does not replace the returned object with an object representing the target. Its documented resolution scope is symbolic links and junctions. ^2^
- Explicit target resolution is a separate operation,
ResolveLinkTarget(bool). Passing false returns the immediate target and true follows links to the final target. That API is documented for symbolic links and junctions. ^3^
Therefore, for symbolic links and junctions, the supported conclusion is:
- The returned object represents the item at the supplied link path.
- Link-specific properties describe that link.
- It is not equivalent to an explicit
ResolveLinkTarget(true) operation.
- This does not imply zero target-related I/O. Property evaluation, filesystem filters, and reparse processing can cause additional access.
For Windows symbolic links specifically, Windows documents that GetFileAttributes and GetFileAttributesEx return attributes for the symbolic link rather than its target. It also documents that find operations return link information, while other APIs can use the target; consequently, an object’s properties should not be generalized into a single “all metadata is link metadata” rule without identifying each underlying API. ^4^
For other reparse-point types, no universal answer follows. Reparse data can be interpreted by a filesystem filter, and that filter may redirect, retrieve, or otherwise process the item. If the corresponding filter is unavailable, opening the item can fail. ^5^ Thus, the symbolic-link/junction conclusions must not be extended to AppExecLink, cloud placeholders, HSM, mount points, or arbitrary third-party tags without a type-specific contract.
For a path such as:
Get-Item -LiteralPath 'C:\example\parent\item'
if parent is a Windows symbolic link, Windows pathname resolution replaces that component with its target and appends the remaining item suffix. Microsoft’s absolute-link example changes:
C:\alpha\beta\absLink\gamma\file
into:
\\machineB\share\gamma\file
when absLink targets \\machineB\share. Relative links are handled similarly, followed by normalization of .. components. ^6^
Accordingly, if parent redirects to C:\target, lookup of the ordinary final component proceeds logically as C:\target\item. The returned object represents item, not parent. This is Windows path resolution, not the PowerShell Extended Type System’s representation of a final linked item.
The PowerShell provider documentation describes the objects and link properties exposed by Get-Item; it does not specify the component-by-component Windows name-resolution algorithm. -LiteralPath prevents PowerShell wildcard interpretation—it should not be treated as a no-follow filesystem-open flag.
Source-level boundary
The repository path for the provider is:
src/System.Management.Automation/namespaces/FileSystemProvider.cs
The available repository source identifies this as the FileSystem-provider implementation location. ^7^
However, that URL points to master, not commit 713e77f15f63bae9f23fb02045c7843ad6a8769b. The supplied material does not contain a commit-pinned listing with the relevant GetItem symbols and calls. It therefore cannot substantiate an exact claim about whether that revision constructs FileInfo/DirectoryInfo, requests attributes, evaluates LinkTarget, or invokes another System.IO helper at a particular line.
The defensible boundary is:
- PowerShell 7.5 contract: final linked items are exposed as
FileInfo/DirectoryInfo objects with link metadata.
- System.IO contract:
LinkTarget and ResolveLinkTarget have explicit symbolic-link/junction semantics.
- Windows contract: intermediate symbolic-link components rewrite the path, while final-component behavior varies by the filesystem API and reparse type.
- Not established here: the exact provider-to-
System.IO call chain at the requested PowerShell commit or a universal zero-target-I/O guarantee.
References
- about_FileSystem_Provider
- FileSystemInfo.LinkTarget Property-Definition
- FileSystemInfo.ResolveLinkTarget(Boolean) Method-Definition
- Symbolic Link Effects on File Systems Functions
- Reparse points
- Creating Symbolic Links
- PowerShell/src/System.Management.Automation/namespaces ... - GitHub