PSADT 4.1.7-global protect

msiexec.exe /i GlobalProtect64-6.2.8.msi PORTAL="secure.connect.aig.com" SAMLBROWSERORDER="no" FULLCHAINCERTVERIFY="yes" POSTVPNCONNECTCOMMAND="\%UserDNSDomain%\NETLOGON\VPN\VPNLogin.vbs" CONNECTMETHOD="user-logon" /qn /norestart"

The requestor have give this command and we need to add this command in the PSADT 4.1.7 script like

## MARK: Install
##================================================

    $adtSession.InstallPhase = $adtSession.DeploymentType

## Handle Zero-Config MSI installations.
    if ($adtSession.UseDefaultMsi)
    {
        $ExecuteDefaultMSISplat = @{ Action = $adtSession.DeploymentType; FilePath = $adtSession.DefaultMsiFile }
        if ($adtSession.DefaultMstFile)
        {
            $ExecuteDefaultMSISplat.Add('Transforms', $adtSession.DefaultMstFile)
        }
        Start-ADTMsiProcess @ExecuteDefaultMSISplat
        if ($adtSession.DefaultMspFiles)
        {
            $adtSession.DefaultMspFiles | Start-ADTMsiProcess -Action Patch
        }
    }

## Install GlobalProtect using Execute-MSI

##================================================
## INSTALLATION
##================================================

$DomainName = (Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters').Domain



if ([string]::IsNullOrWhiteSpace($DomainName)) {
    throw "Domain name could not be retrieved from registry."
}

$PostVpnConnectCommand = "\\$DomainName\NETLOGON\VPN\VPNLogin.vbs"
$MsiArguments = @(
    'REBOOT="ReallySuppress"'
    'PORTAL="secure.connect.aig.com"'
    'SAMLBROWSERORDER="no"'
    'FULLCHAINCERTVERIFY="yes"'
    "POSTVPNCONNECTCOMMAND=`"$PostVpnConnectCommand`""
    'CONNECTMETHOD="user-logon"')

$MsiArguments | ForEach-Object { Write-Host $_ }
 
$rtnVal = (Start-ADTMsiProcess -Action 'Install' -FilePath 'GlobalProtect64-6.3.3-c1016.msi' -ArgumentList $MsiArguments -PassThru).ExitCode

if ($rtnVal.ExitCode -in @(0,3010))
{
Write-ADTLogEntry -Message "GlobalProtect64-6.3.3-c1016 installed successfully with ExitCode: $($rtnVal.ExitCode)"
}
else
{
Write-ADTLogEntry -Message "GlobalProtect64-6.3.3-c1016 installation failed with ExitCode: $($rtnVal.ExitCode)" -Severity 3
Exit-Script -ExitCode $rtnVal.ExitCode
}
Start-Sleep -Seconds 4

but we are unable to install the properly. we are getting 1603 error

could you please suggest exact command /parameter /root cause

Change the above to $rtnVal = (Start-ADTMsiProcess -Action 'Install' -FilePath 'GlobalProtect64-6.3.3-c1016.msi' -AdditionalArgumentList $MsiArguments -PassThru).ExitCode so you don't obliterate our default msiexec.exe parameters (such as logging, etc), then review the msiexec.exe log that's produced (the PSADT log will tell you where msiexec.exe logging went).

While I welcome you to the community as a new member, please try to structure your posts a little better. You're inconsistently using codeblocks which makes it hard to read, and you don't state what the issue is until 75% through the report. Making your report easier to read means people will be more inclined to help.