How to set Portal address in Global Protect using powershell

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

How to set Portal address in Global Protect using powershell

L0 Member

Hi, I want to install Global protect using powershell. It gets installed but Portal address is not set by powershell, as it ask for manual input for that.

My code :

# Get full path of msiexec, which is more reliable than depending on PATH env var
$msiexec = Join-Path ([Environment]::SystemDirectory) msiexec.exe

# Start msiexec and wait until it has finished
$process = Start-Process $msiexec -PassThru -Wait -ArgumentList "/i `"$PSScriptRoot\Files\GlobalProtect64-5.2.10.msi`" /q /norestart /l*v `"$PSScriptRoot\instlog.txt`" PORTAL=`"vpn.abc.com`"

# Check if installation was successful
# Exit codes of 0 (ERROR_SUCCESS) and 3010 (ERROR_SUCCESS_REBOOT_REQUIRED) indicate success
if( $process.ExitCode -in 0, 3010 ) {
    Write-Host 'Installation successful'
    if( $process.ExitCode -eq 3010 ) {
        Write-Host 'A reboot is required'
    }
} 
else {
    Write-Host "Installation failed with exit code $($process.ExitCode)"
}

 In logs I can see : LOG details : PROPERTY CHANGE: Adding PORTAL property. Its value is 'vpn.abc.com'.

 

Any help will be thankfull.

2 REPLIES 2

Cyber Elite
Cyber Elite

@Shubham_10,

The application reads the portal from the registry by default, so what I do is simply stage the required registry key with the proper portal address on all endpoints. This way you can deploy it to all endpoints and even if GlobalProtect is never installed the fact the key exists doesn't matter. 

Key Path: HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup

Value Name: Portal

Value Type: REG_SZ

Value Data: PortalAddress

Hi, thanks for reply. I tried what you said but same pop up comes with manual insert of portal address.

Shubham_10_0-1664792739416.png

 

  • 3644 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!