Given a URL like this: https://xyzt-pbi.co.com/reports/powerbi/Platform%20Status%20Reports/MSAS%20PBI%202019%20v10
How do i parse the server in powershell, in other words, i want this portion only: xyzt-pbi.co.com
Given a URL like this: https://xyzt-pbi.co.com/reports/powerbi/Platform%20Status%20Reports/MSAS%20PBI%202019%20v10
How do i parse the server in powershell, in other words, i want this portion only: xyzt-pbi.co.com
Cast to [uri] (System.Uri) and access the resulting instance's .Host property:
PS> (
[uri] 'https://xyzt-pbi.co.com/reports/powerbi/Platform%20Status%20Reports/MSAS%20PBI%202019%20v10'
).Host
xyzt-pbi.co.com