If I use:
Get-PSDrive KI get some properties returned, amongst others the Root property, which looks like this:
PS C:\WINDOWS\system32> get-psdrive K
Name Used (GB) Free (GB) Provider Root
---- --------- --------- -------- ----
K FileSystem \\server\sharebut if I select Root, I get this returned:
PS C:\WINDOWS\system32> get-psdrive K | select Root
Root
----
K:\DisplayRoot returns the root as seen in my first command:
PS C:\WINDOWS\system32> get-psdrive K | select DisplayRoot
DisplayRoot
-----------
\\server\shareFormat-List also returns them like my two commands above
PS C:\WINDOWS\system32> get-psdrive K | fl *
Used : 0
Free :
CurrentLocation :
Name : K
Provider : Microsoft.PowerShell.Core\FileSystem
Root : K:\
Description :
MaximumSize :
Credential : System.Management.Automation.PSCredential
DisplayRoot : \\server\shareI can just use DisplayRoot to get the UNC-Share, but why does Get-PSDrive on it's own return the DisplayRoot Property in the Root column? Is this by design?
I'm on:
PS C:\WINDOWS\system32> $PSVersionTable.PSVersion.ToString()
5.1.14393.2189 2 Reset to default