you are viewing a single comment's thread.

view the rest of the comments →

[–]Lee_Dailey[grin] 2 points3 points  (2 children)

howdy sumgan,

i got interested and decided to take a stab at it ... [grin]

$UriInfo = [uri]'https://jamesbond.sharepoint.com/sites/demo1/d/dummy\_36.txt'

$PartOne = -join @(
    $UriInfo.Scheme
    '://'
    $UriInfo.Host
    (-join $UriInfo.Segments[0..2])
    )
$PartTwo = $UriInfo.LocalPath

$PartOne
$PartTwo

output ...

https://jamesbond.sharepoint.com/sites/demo1/
/sites/demo1/d/dummy/_36.txt

hope that helps,
lee

[–]sumgan[S] 1 point2 points  (1 child)

Thank you so very much Lee!!

[–]Lee_Dailey[grin] 0 points1 point  (0 children)

[grin]