Created
March 6, 2019 16:29
-
-
Save IISResetMe/fb61c896e31ac368ee1627f90201625d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Join-Uri | |
{ | |
param( | |
[Parameter(Mandatory = $true, Position = 0)] | |
[uri]$BaseUri, | |
[Parameter(Mandatory = $true, ValueFromRemainingArguments = $true)] | |
[string[]]$PathSegments | |
) | |
foreach($Segment in $PathSegments){ | |
$BaseUri = [uri]::new($BaseUri,$Segment) | |
} | |
return $BaseUri | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment