<summary>PowerShell installation script</summary>
```powershell
# Define log file
$logFile = "$env:ProgramData\GSAInstall\install.log" New-Item -ItemType Directory -Path (Split-Path $logFile) -Force | Out-Null
function Write-Log { param ([string]$message) $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" Add-Content -Path $logFile -Value "$timestamp - $message" }
try { $ErrorActionPreference = 'Stop' Write-Log "Starting Global Secure Access client installation."
# IPv4 preferred via DisabledComponents registry value
$ipv4RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters"
$ipv4RegName = "DisabledComponents"
$ipv4RegValue = 0x20 # Prefer IPv4 over IPv6
$rebootRequired = $false
# Ensure the key exists
if (-not (Test-Path $ipv4RegPath)) {
New-Item -Path $ipv4RegPath -Force | Out-Null
<summary>PowerShell installation script</summary>
```powershell
# Create log directory and log helper
$logFile = "$env:ProgramData\GSAInstall\install.log"
New-Item -ItemType Directory -Path (Split-Path $logFile) -Force | Out-Null
function Write-Log {
param([string]$message)
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Add-Content -Path $logFile -Value "$timestamp - $message"
}
try {
$ErrorActionPreference = 'Stop'
Write-Log "Starting Global Secure Access client installation."
# IPv4 preferred via DisabledComponents registry value
$ipv4RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters"
$ipv4RegName = "DisabledComponents"