<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: change portal address remotely in GlobalProtect Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343861#M345</link>
    <description>&lt;P&gt;yes. and it changes it back to the old value after you start the service again.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Aug 2020 05:05:57 GMT</pubDate>
    <dc:creator>NOC-VL</dc:creator>
    <dc:date>2020-08-14T05:05:57Z</dc:date>
    <item>
      <title>change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343291#M333</link>
      <description>&lt;P&gt;We want to move the users to a different portal adres. How can we do this without asking all users to manualy adjust the portal adres?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i've tried changing the reg key set at installation time, but this didn't work (tried rebooting and refresh connection).&lt;/P&gt;&lt;P&gt;After the reboot it even changed back!&lt;/P&gt;&lt;P&gt;Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My assumption would be:&lt;/P&gt;&lt;P&gt;1. change regkey adres&lt;/P&gt;&lt;P&gt;2. delete the appdata folder&lt;/P&gt;&lt;P&gt;C:\Users\%username%\AppData\Local\Palo Alto Networks\GlobalProtect&lt;/P&gt;&lt;P&gt;3. reboot ?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 14:49:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343291#M333</guid>
      <dc:creator>NOC-VL</dc:creator>
      <dc:date>2020-08-11T14:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343832#M344</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/144294"&gt;@NOC-VL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try this way?&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Stop the PanGPS Service&lt;/LI&gt;
&lt;LI&gt;Change the reg key for the portal&lt;/LI&gt;
&lt;LI&gt;Start the PanGPS Service again&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 13 Aug 2020 21:29:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343832#M344</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2020-08-13T21:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343861#M345</link>
      <description>&lt;P&gt;yes. and it changes it back to the old value after you start the service again.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 05:05:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/343861#M345</guid>
      <dc:creator>NOC-VL</dc:creator>
      <dc:date>2020-08-14T05:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/365505#M610</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Any updates on this? We have exactly the same issue. It works after i repair the installation manually on the computer, but that just isn't doable for all my users.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 10:39:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/365505#M610</guid>
      <dc:creator>DavidStevens</dc:creator>
      <dc:date>2020-11-25T10:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/378087#M764</link>
      <description>&lt;P&gt;the sequence should be&lt;/P&gt;&lt;P&gt;net stop panGPS&lt;/P&gt;&lt;P&gt;[HKEY_CURRENT_USER\Software\Palo Alto Networks\GlobalProtect\Settings] "LastUrl"="your-portal-here"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;remove old portal&lt;BR /&gt;[-HKEY_CURRENT_USER\Software\Palo Alto Networks\GlobalProtect\Settings\old-portal]&lt;/P&gt;&lt;P&gt;net start panGPS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this can't be executed. a normal user can't stop/start pangps and a system user doesn't know the users regkey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 07:49:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/378087#M764</guid>
      <dc:creator>NOC-VL</dc:creator>
      <dc:date>2021-01-06T07:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/393704#M1058</link>
      <description>&lt;P&gt;I've written a powershell script to do this. maybe this will help others.&lt;/P&gt;&lt;P&gt;It first stops pangs, changes and removes the old portals while iterating over the registery for all users and then starts it again.&lt;/P&gt;&lt;P&gt;Run it with elevated privilages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#check for input
if (!$args[0] )
{ Write-Host "Invalid argument. usage: change-portal.ps1 &amp;lt;new portal&amp;gt;"
exit }

#vars
$PortalAddress = $args[0]
$OldPortals = @('x.oldportal1.com', 'x2.oldportal1.com' )

#Get current portal
$pansetup = Get-ItemProperty -path "registry::HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup" -Name 'Portal'
$pansetup = $pansetup.Portal

Write-Host "Changing install portal address $pansetup to $PortalAddress"

#stop global protect
Stop-Service PanGPS
#set portal adres for new installations
Set-Itemproperty -path "registry::HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup" -Name 'Portal' -value $PortalAddress

# Regex pattern for SIDs
$PatternSID = 'S-1-5-21-\d+-\d+\-\d+\-\d+$'
 
# Get Username, SID, and location of ntuser.dat for all users
$ProfileList = gp 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\*' | Where-Object {$_.PSChildName -match $PatternSID} | 
    Select  @{name="SID";expression={$_.PSChildName}}, 
            @{name="UserHive";expression={"$($_.ProfileImagePath)\ntuser.dat"}}, 
            @{name="Username";expression={$_.ProfileImagePath -replace '^(.*[\\\/])', ''}}
 
# Get all user SIDs found in HKEY_USERS (ntuder.dat files that are loaded)
$LoadedHives = gci Registry::HKEY_USERS | ? {$_.PSChildname -match $PatternSID} | Select @{name="SID";expression={$_.PSChildName}}
 
# Get all users that are not currently logged
$UnloadedHives = Compare-Object $ProfileList.SID $LoadedHives.SID | Select @{name="SID";expression={$_.InputObject}}, UserHive, Username
 
# Loop through each profile on the machine
Foreach ($item in $ProfileList) {
    # Load User ntuser.dat if it's not already loaded
    IF ($item.SID -in $UnloadedHives.SID) {
        reg load HKU\$($Item.SID) $($Item.UserHive) | Out-Null
    }
 
    #####################################################################
    # This is where you can read/modify a users portion of the registry 
 
    "{0}" -f $($item.Username) | Write-Output
    Set-Itemproperty -path "registry::HKEY_USERS\$($Item.SID)\Software\Palo Alto Networks\GlobalProtect\Settings" -Name 'LastUrl' -value $PortalAddress
    Foreach ($Oldportal in $Oldportals) { 
        Remove-Item -path "registry::HKEY_USERS\$($Item.SID)\Software\Palo Alto Networks\GlobalProtect\Settings\$OldPortal" -Recurse   
    }
    #####################################################################
 
    # Unload ntuser.dat        
    IF ($item.SID -in $UnloadedHives.SID) {
        ### Garbage collection and closing of ntuser.dat ###
        [gc]::Collect()
        reg unload HKU\$($Item.SID) | Out-Null
    }
}
#start global protectc
Start-Service PanGPS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 06:11:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/393704#M1058</guid>
      <dc:creator>NOC-VL</dc:creator>
      <dc:date>2021-03-25T06:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/443690#M2077</link>
      <description>&lt;P&gt;I came here and created an account just say Thank you&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/144294"&gt;@NOC-VL&lt;/a&gt;&amp;nbsp;!! This gave me a great starting point for my script. I am not sure why anyone else is not complaining about the fact that when you change the "pansetup" key it doesnt actually change anything for users that have already logged in via GP and created a profile (under their individual "HKEY_USERS" tree!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 05:21:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/443690#M2077</guid>
      <dc:creator>dcarr_Beachbody</dc:creator>
      <dc:date>2021-10-27T05:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/504522#M2884</link>
      <description>&lt;P&gt;This is great work. Thank you for sharing it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 17:18:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/504522#M2884</guid>
      <dc:creator>IvanArmour</dc:creator>
      <dc:date>2022-06-17T17:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: change portal address remotely</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/554951#M4321</link>
      <description>&lt;P&gt;Nice work one of my customer asked me this very question today and I told him I will try and get answer for him and he found this here and sent me the link. Great work thanks for sharing&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 22:09:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/change-portal-address-remotely/m-p/554951#M4321</guid>
      <dc:creator>alnangpal</dc:creator>
      <dc:date>2023-08-23T22:09:43Z</dc:date>
    </item>
  </channel>
</rss>

