Excel/Powershell to extract substring from a URL

I want to extract root URL from full URL. how to extract that based on number of “/” in that.

for example:


from this URL i want to extract below root site(string before 5th “/”).


Please assist how to achieve this in Powershell and in excel.