Changing base URL on Citrix Storefront

When setting up storefront for the first time you might forget to bind it to a certificate and make it over HTTPS.

So If you get a certificate and wish to change this to HTTPS later you have no visual options to change this.
You have to run a PowerShell script to change this. First, you have to alter the site binding on the IIS manager and allow for https traffic and bind it to a certificate.

Then you have to open a PowerShell promt as administrator à
Then run the set-executionpolicy unrestricted

Then run the script SetHostBaseUrl.ps1 from the folder C:\program files\citrix\receiver storefront\scripts
And this script requires so-called ‘dot-sourcing’ so you have to type the command as

. .\sethostbaseurl.ps1 «https://nameoftheurl.domain.domain»

After this is done you can refresh the Storefront console and voila!