Search notes:

System.Management.Automation.PathInfo (class)

A System.Management.Automation.PathInfo object represents a path (such as a file system path or a registry key name).
A PathInfo object is returned in PowerShell by cmdLets such as get-location, resolve-path or the automatic variable $pwd.
Sometimes (I have not figured out when exactly), the ToString() method of PathInfo prepends the path with some provider related information (for example Microsoft.PowerShell.Core\FileSystem::) which can be, frankly, quite a nuisance.
In order to get rid of this prefix, the providerPath property must be used:
"Current directory is: $pwd"
#
# Current directory is: Microsoft.PowerShell.Core\FileSystem::P:\ath\to\directory

"Current directory is: $($pwd.providerPath)"
#
# Current directory is: P:\ath\to\directory

See also

Compare with System.IO.DirectoryInfo

Index