# setting multiple home pages via power shell

**URL:** <https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484>\
**Category:** PowerShell Help\
**Created:** [May 1, 2019, 6:01am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484 "2019-05-01T06:01:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![geraldpeoples](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@geraldpeoples](https://forums.powershell.org/u/geraldpeoples)\
**Post date:** [May 1, 2019, 6:01am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/1 "2019-05-01T06:01:48Z")

</div>

When setting up new users we have 6 pages that are requested to be readily accessible. i have a script that works 33% of the way

&nbsp;

[pre]$HomeURL = “[http://site1.com](http://site1.com)"  
$HomeURL2 = “[https://site2.com](https://site2.com)”  
$HomeURL3 = “[https://site3.com](https://site3.com)”  
$HomeURL4 = “[https://site4.com](https://site4.com)”  
$HomeURL5 = “[https://site5.com](https://site5.com)”  
$HomeURL6 = “[http://site6.com](http://site6.com)”

set-ItemProperty -Path ‘HKCU:\Software\Microsoft\Internet Explorer\main’ -Name “Start Page” -Value $HomeURL  
set-ItemProperty -Path ‘HKCU:\Software\Microsoft\Internet Explorer\main’ -Name “Secondary Start Pages” -Value $HomeURL2,$HomeURL3,$HomeURL4,$HomeURL5,$HomeURL6,[/pre]

&nbsp;

the first two URLs are opened but 3-6 are not. i have tried the , and the ; to separate the secondary start pages but no luck.

if you could let me know how i can reformat so that all the tabs open with their respective URL i would be thankful

&nbsp;

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [May 1, 2019, 6:45am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/2 "2019-05-01T06:45:23Z")

</div>

```
$Path = 'HKCU:\Software\Microsoft\Internet Explorer\main'
$StartPage = 'http://site1.com'
$SecondaryStartPageList = @(
    'https://site2.com',
    'https://site3.com',
    'https://site4.com',
    'https://site5.com',
    'http://site6.com'
)

Set-ItemProperty -Path $Path -Name 'Start Page' -Value $StartPage
Set-ItemProperty -Path $Path -Name 'Secondary Start Pages' -Value $SecondaryStartPageList
```

---

<div class="post-metadata">

**Author:** ![geraldpeoples](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@geraldpeoples](https://forums.powershell.org/u/geraldpeoples)\
**Post date:** [May 1, 2019, 7:56am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/3 "2019-05-01T07:56:57Z")

</div>

Thank you for the help

it opens up the tabs but the urls are all strung along in the address bar and cannot open the page correctly

&nbsp;

for example on the second tab the url is [https://site2.com](https://site2.com)%[https://site3.com](https://site3.com)%https//site4.com

i tried changing the , to ; with no luck

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [May 1, 2019, 8:11am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/4 "2019-05-01T08:11:31Z")

</div>

When you create the reg entry, is the type “REG\_MULTI\_SZ”? May be a silly question, but maybe why the second tab is combining the rest of the urls into a single string.

pwshliquori

---

<div class="post-metadata">

**Author:** ![geraldpeoples](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@geraldpeoples](https://forums.powershell.org/u/geraldpeoples)\
**Post date:** [May 1, 2019, 8:19am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/5 "2019-05-01T08:19:12Z")

</div>

they are REG\_SZ not REG\_MULTI\_SZ

&nbsp;

a simple way around it is i just copied the desired urls to notepad to a public drive and copy and pasted it. but now this is going to bug me where its going wrong in script form 🙂

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [May 1, 2019, 8:24am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/6 "2019-05-01T08:24:19Z")

</div>

If you set the type to REG\_MULTI\_SZ and use the example from @Olaf-Soyk, it should work. I have tested and confirmed working in my lab environment.

`Start Page` type should be `REG_SZ`

and

`Secondary Start Pages` type should be `REG_MULTI_SZ`

pwshliquori

---

<div class="post-metadata">

**Author:** ![geraldpeoples](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@geraldpeoples](https://forums.powershell.org/u/geraldpeoples)\
**Post date:** [May 1, 2019, 9:17am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/7 "2019-05-01T09:17:29Z")

</div>

thank you i will give that a test. i do appreciate the help on this

If you set the type to REG\_MULTI\_SZ and use the example from [@olaf-soyk](https://powershell.org/forums/users/olaf-soyk/), it should work. I have tested and confirmed working in my lab environment.

`Start Page` type should be `REG_SZ`

and

`Secondary Start Pages` type should be `REG_MULTI_SZ`

&nbsp;

going by the code below where would the reg\_multi\_sz go?

_Set-ItemProperty -Path $Path -Name ‘Start Page’ -Value $StartPage_  
_Set-ItemProperty -Path $Path -Name ‘Secondary Start Pages’ -Value $SecondaryStartPageList_

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [May 1, 2019, 9:57am UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/8 "2019-05-01T09:57:19Z")

</div>

`Set-ItemProperty` cannot update the type of a registry entry. You can use the `New-ItemProperty`, `-Type` and `-Force` to update the type of the entry.

You can find more information about `New-ItemProperty` from [here](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-itemproperty?view=powershell-6)

pwshliquori

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:32pm UTC](https://forums.powershell.org/t/setting-multiple-home-pages-via-power-shell/12484/9 "2024-05-16T20:32:55Z")

</div>


