Skip to content

Instantly share code, notes, and snippets.

@jdharmon
Created February 12, 2019 18:56
Show Gist options
  • Save jdharmon/2347af2b753e480b881b8621ebe89e47 to your computer and use it in GitHub Desktop.
Save jdharmon/2347af2b753e480b881b8621ebe89e47 to your computer and use it in GitHub Desktop.
PowerShell Join-Url
function Join-Url([string[]]$parts) {
return ($parts | % { $_.Trim('/') } | ? { $_ }) -join '/'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment