Resolve-PathEx is a wrapper around Resolve-Path that adds support for resolving paths for files that don’t exist. Why would you ever want that? Have you ever created a function with a path parameter and a file name parameter, where the function itself would create a new file? With this function you could combine those two parameters into one. The great thing about Resolve-PathEx is that it supports wildcards (the same as Resolve-Path).

The function outputs a PSObject of course, with two properties; Path and Exists. The latter is a boolean and will tell you whether the fully resolved path exists or not.

As always, the code is hosted on GitHub, so if you spot a bug, or have any ideas for future improvements, fork my code and help me make it better!

One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s