- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-30-2022 04:45 AM
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.
09-30-2022 07:37 AM
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
10-03-2022 03:26 AM
Hi, thanks for reply. I tried what you said but same pop up comes with manual insert of portal address.
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!