Join-Path and Split-Path both fail if they are joining or splitting file paths that use a drive letter that is not on the local machine. Since PowerShell has Remoting as a core feature, it is not uncommon to do some work in a remote session and some work locally. As a result, you may be processing paths that contain drive letters that exist on a remote machine but not on the local system. If you need to use Join-Path or Split-Path on such a path, you will receive an error message that the drive does not exist. This is very limiting for these otherwise highly useful cmdlets.A scenario where you might want to do something with this: querying a remote machine to get the path for a file, processing it locally to get the containing folder, and then invoking Move-Item to move the file from remote machine 1 to remote machine 2. If you don't have the same drive on the local system, the processing to get the containing folder work fails.
Please wait...