How to normalize a path in PowerShell?

You can expand ..\frag to its full path with resolve-path:

PS > resolve-path ..\frag 

Try to normalize the path using the combine() method:

[io.path]::Combine("fred\frog",(resolve-path ..\frag).path)

Leave a Comment