Categories

Split-Path & UNC

split-path works with with UNC paths as well as normal paths

 

PS> $path = "\\UNCserver\TFSBuilds\componenet\v11.1\XS11.1\XS11.1_11.1.0.35"
PS> Split-Path -Path $path -Parent
\\UNCserver\TFSBuilds\componenet\v11.1\XS11.1

 

PS> Split-Path -Path (get-location) -Parent
C:\scripts

Leave a Reply