Skip to main content

2026 年 7 月 20 日

运行 PowerShell 脚本执行部署

PowerShell 脚本可在您的环境中准备所有配置设置。当您通过运行 PowerShell 脚本来部署 Unified Access Gateway 时,该解决方案会在第一次系统引导时为生产做好准备。

**重要信息:**在 PowerShell 部署中,您可以在 INI 文件中提供所有设置,以便 Unified Access Gateway 实例在引导后可直接用于生产。如果您不想在部署后更改任何设置,则无需提供管理 UI 密码。

但是,如果在部署过程中未提供管理 UI 密码,则管理 UI 和 API 都将不可用。如果在部署时未提供管理 UI 密码,则以后将无法通过添加用户来启用对管理 UI 或 API 的访问权限。您必须重新部署 Unified Access Gateway。

您可以在 INI 文件中包含用于创建具有监控角色的低特权管理员用户的参数。不支持创建超级用户管理员用户。在部署 Unified Access Gateway 实例之前,您可以为 root 用户和管理员用户配置密码策略。

有关参数的更多信息,您可以查看使用等效管理 UI 参数的章节。例如:PowerShell 部署参数使用 OVF 模板向导部署到 vSphere 中介绍了一些部署参数,有关系统配置、syslog 服务器设置、网络设置等中所用参数的信息,请参阅高级设置,以及有关 Edge 服务和其他 Unified Access Gateway 用例(例如 Workspace ONE Intelligence 和身份桥接)中所用参数的信息,请参阅 Edge 服务设置

必备条件

  • 如果是 Hyper-V 部署并且要使用静态 IP 来升级 Unified Access Gateway,请在部署新的 Unified Access Gateway 实例之前删除旧设备。
  • 确认满足使用此脚本的相应系统要求。

步骤

  1. Customer Connect 门户将 Unified Access Gateway OVA 下载到您的计算机。

  2. 将 uagdeploy-XXX.zip 文件下载到计算机上的某个文件夹中。

    ZIP 文件可在 Unified Access Gateway 的 Customer Connect 页面中获取。

  3. 打开 PowerShell 脚本,将目录修改为您脚本所在的位置。

  4. 打开 Unified Access Gateway 虚拟设备的 INI 配置文件。请参阅 PowerShell 部署参数

    例如:部署新的 Unified Access Gateway 设备 UAG1。将配置文件命名为 uag1.ini。此文件中包含 UAG1 的所有配置设置。您可以使用 uagdeploy.ZIP 文件中的示例 INI 文件创建 INI 文件,并相应地修改设置。

    注意

    • 您可以为环境中的多个 Unified Access Gateway 部署创建唯一的 INI 文件。您必须在 INI 文件中相应地更改 IP 地址和名称参数才能部署多个设备。

    • 要将私钥从 PKCS8 转换为 PKCS1(即,从 BEGIN PRIVATE KEY 格式转换为 BEGIN RSA PRIVATE KEY 格式),请运行以下 openssl 命令:

      openssl rsa -in key.pem -out keyrsa.pem

      要转换扩展名为 .p12 或 .pfx 的 PKCS#12 格式文件,并确保密钥为 RSA 密钥,请运行以下命令:

      openssl pkcs12 -in cert.pfx -nokeys -out cert.pem

      openssl pkcs12 -in cert.pfx -nodes -nocerts -out key.pem

      openssl rsa -in key.pem -check -out keyrsa.pem

    • INI 文件中包含的 [adminSAMLSettings] 用于配置 SAML 身份验证方法,以用来对拥有管理 UI 的管理员访问权限的用户进行身份验证。此处,entityId 是指外部元数据提供程序实体 ID。

    • 具有监控角色的低特权管理员用户的密码将作为 PowerShell 脚本的参数提供。如果未提供密码,则系统会提示用户输入密码。将 newAdminUserPwd 作为参数提供,且该参数值与 monitoringUser1:P@ssw0rd1;monitoringUser2:P@ssw0rd2 类似。INI 文件中的 enabled 参数是可选的,如果参数不可用,则默认为 true。

  5. 要确保脚本执行不受限制,请输入 PowerShell set-executionpolicy 命令。

    set-executionpolicy -scope currentuser unrestricted
    

    注意:只需执行一次即可除去限制。
    如果出现有关脚本的警告,请运行以下命令以取消阻止该警告:
    unblock-file -path .\uagdeploy.ps1

  6. 运行以下命令开始部署。如果未指定 .INI 文件,则脚本默认使用 ap.ini

    .\uagdeploy.ps1 -iniFile uag1.ini
    
  7. 在提示时输入凭据,然后完成脚本。

    **注意:**如果提示您为目标计算机添加指纹,请输入 yes

    Unified Access Gateway 设备已部署并且可以用于生产。

INI 示例文件

[General]
adminCertRolledBack=false
adminDisclaimerText=
adminMaxConcurrentSessions=5
adminPasswordExpirationDays=90
adminPasswordPolicyFailedLockoutCount=3
adminPasswordPolicyMinLen=8
adminPasswordPolicyUnlockTime=5
adminSessionIdleTimeoutMinutes=10
authenticationTimeout=300000
bodyReceiveTimeoutMsec=15000
ceipEnabled=true
cipherSuites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384
clientConnectionIdleTimeout=180
cookiesToBeCached=none
defaultGateway=10.108.120.125
deploymentOption=threenic
diskMode=
dns = 192.0.2.1 192.0.2.2
dnsSearch = example1.com example2.com
ds=
dsComplianceOS=false
eth0CustomConfig=DHCP^UseDNS=false
eth1CustomConfig=DHCP^UseDNS=false
extendedServerCertValidationEnabled=false
fallBackNtpServers=ipOrHostname1 ipOrHostname2
fipsEnabled=false
healthCheckUrl=/favicon.ico
hostClockSyncEnabled=false
httpConnectionTimeout=120
ip0=10.108.120.119
ipMode=DHCPV4_DHCPV6
ipModeforNIC2=DHCPV4_DHCPV6
ipModeforNIC3=DHCPV4_DHCPV6
isCiphersSetByUser=false
isTLS11SetByUser=false
locale=en_US
monitoringUsersPasswordExpirationDays=90
monitorInterval=60
name=
netBackendNetwork=
netInternet=
netManagementNetwork=
ntpServers=ipOrHostname1 ipOrHostname2
osLoginUsername= 
osMaxLoginLimit=10
outboundCipherSuites=
passwordPolicyFailedLockout=3
passwordPolicyMinClass=1
passwordPolicyMinLen=6
passwordPolicyUnlockTime=900
quiesceMode=false
requestTimeoutMsec=10000
rootPasswordExpirationDays=365
rootSessionIdleTimeoutSeconds=300
secureRandomSource=
sessionTimeout=36000000
snmpEnabled= TRUE | FALSE
source=
sshEnabled=
sshInterface=eth0
sshKeyAccessEnabled=
sshLoginBannerText= EUC Unified Access Gateway
sshPasswordAccessEnabled=
sshPort=22
sshPublicKey1=
ssl30Enabled=false
sslprovider=
target=
tls10Enabled=false
tls11Enabled=false
tls12Enabled=true
tls13Enabled=true
tlsNamedGroups=
tlsPortSharingEnabled=true
tlsSignatureSchemes=
uagName=UAG1
unrecognizedSessionsMonitoringEnabled=true
gatewaySpec=

[WorkspaceOneIntelligenceSettings1]
encodedCredentialsFile=
name=TEST1
trustedCert1=
urlThumbprints=bed22939bf8546d15de2136f4c33f48f31d44e71

[WorkspaceOneIntelligenceSettings2]
encodedCredentialsFile=
name=RISK_SCORE

[SnmpSettings]
version= v3
usmUser=SAM_SNMP_V3
securityLevel=
authAlgorithm=
authPassword=
privacyAlgorithm=
privacyPassword=
engineID=uag1.example.com

[SnmpSettings]
version=V1+V2c
communityName=abc

[WebReverseProxy1]
proxyDestinationUrl=https://10.108.120.21
trustedCert1=
instanceId=view
healthCheckUrl=/favicon.ico
userNameHeader=AccessPoint-User-ID
proxyPattern=/(.*)
landingPagePath=/
hostEntry1=10.108.120.21 HZNView.uagqe.auto.com

[Horizon]
endpointComplianceCheckProvider=Workspace_ONE_Intelligence_Risk_Score
proxyDestinationUrl=https://enterViewConnectionServerUrl
trustedCert1=
gatewayLocation=external
blastExternalUrl=
additionalBlastExternalUrls=
tunnelExternalUrl=
additionalTunnelExternalUrls=
disableWebClient=true
healthCheckUrl=/favicon.ico
proxyDestinationIPSupport=IPV4
smartCardHintPrompt=false
queryBrokerInterval=300
proxyPattern=(/|/view-client(.*)|/portal(.*)|/appblast(.*))
matchWindowsUserName=false
windowsSSOEnabled=false
complianceCheckOnAuthentication=true
proxyDestinationUrlThumbprints=
proxyDestinationPreLoginMessageEnabled=true
customExecutable1=WEBEXVDIPLUGIN
enableAuthOnRedirectedSite=false

#Origin header details objects being used
originHeaderDetailsList=1,2,3

[OriginHeaderDetails1]
origin=userorigin.com
rewriteEnabled=true
autoGenerated=false

[OriginHeaderDetails2]
origin=tunnelurl.com
rewriteEnabled=false
autoGenerated=true

[OriginHeaderDetails3]
origin=https://uag-origin.test.com:443
rewriteEnabled=true
autoGenerated=false

[CustomExecutableSettings1]
name=OPSWAT2
osType=
trustedSigningCertificates1=
url=<<URL to custom executable file>>
urlResponseRefreshInterval=
isObtainedFromURL=

[Airwatch]
tunnelGatewayEnabled=true
disableAutoConfigUpdate=false
pacFilePath=
pacFileURL=
credentialFilePath=
apiServerUsername=domain\apiusername
apiServerPassword=*****
proxyDestinationUrl=https://null
ntlmAuthentication=false
healthCheckUrl=/favicon.ico
organizationGroupCode=
apiServerUrl=https://null
outboundProxyHost=1.2.3.4
outboundProxyPort=3128
outboundProxyUsername=proxyuser
outboundProxyPassword=****
reinitializeGatewayProcess=false
airwatchServerHostname=tunnel.acme.com
trustedCert1=c:\temp\CA-Cert-A.pem
hostEntry1=1.3.5.7 backend.acme.com
tunnelConfigurationId=

[AirwatchSecureEmailGateway]
memConfigurationId=abc123
apiServerUsername=domain\apiusername
healthCheckUrl=/favicon.ico
apiServerUrl=https://null
outboundProxyHost=1.2.3.4
outboundProxyPort=3128
outboundProxyUsername=proxyuser
outboundProxyPassword=****
reinitializeGatewayProcess=false
airwatchServerHostname=serverNameForSNI
apiServerPassword=****
trustedCert1=c:\temp\CA-Cert-A.pem
pfxCerts=C:\Users\admin\My Certs\mycacerts.pfx
hostEntry1=1.3.5.7 exchange.acme.com

[AirWatchContentGateway]
cgConfigId=abc123
apiServerUrl=https://null
apiServerUsername=domain\apiusername
apiServerPassword=*****
outboundProxyHost=
outboundProxyPort=
outboundProxyUsername=proxyuser
outboundProxyPassword=*****
hostEntry1=192.168.1.1 cgbackend.acme.com
trustedCert1=c:\temp\CA-Cert-A.pem
ntlmAuthentication=false
reinitializeGatewayProcess=false
airwatchServerHostname=cg.acme.com

[SSLCert]
pemPrivKey=
pemCerts=
pfxCerts=
pfxCertAlias=

[SSLCertAdmin]
pemPrivKey=
pemCerts=
pfxCerts=
pfxCertAlias=

[WorkspaceONEIntelligenceRiskScoreEndpointComplianceCheckSettings]
allowLow=true
allowMedium=true
allowHigh=true
allowOthers=false
complianceCheckInterval=5
name=Workspace_ONE_Intelligence_Risk_Score
workspaceOneIntelligenceSettingsName=RISK_SCORE

[JWTSettings1]
publicKey1=
publicKey2=
publicKey3=
name=JWT_1

[JWTSettings2]
publicKey1=
publicKey2=
name=JWT_2

[JWTIssuerSettings1]
issuer=issuer-1
jwtType=PRODUCER
name=issuerJWT_1
pemPrivKey=
pemCerts=
pfxCerts=
pfxCertAlias=

[JWTIssuerSettings2]
issuer=issuer-2
jwtType=PRODUCER
name=issuerJWT_2
pemPrivKey=
pemCerts=
pfxCerts=
pfxCertAlias=

[AdminUser1]
enabled=true
name=monitoringUser1

[AdminUser2]
enabled=true
name=monitoringUser2

[OutboundProxySettings1]
proxyUrl=
name=
proxyType=HTTP
includedHosts1=
includedHosts2=
trustedCert1=

[OutboundProxySettings2]
proxyUrl=
name=
proxyType=HTTP
includedHosts1=
includedHosts2=
trustedCert1=

[adminSAMLSettings]
enable=true
entityId=https://www.entityid.com

[IDPExternalMetadata1]
allowUnencrypted=false
certChainPem=
encryptionCertificateType=
entityID=<entityID>
forceAuthN=false
metadataXmlFile=<Path of IDP metadata xml file>
privateKeyPem=

[OPSWATEndpointComplianceCheckSettings]
allowInCompliance=
allowEndpointUnknown=
complianceCheckFastInterval=
complianceCheckInitialDelay=
complianceCheckInterval=
allowNotInCompliance=
allowOutOfLicenseUsage=
allowAssessmentPending=
allowOthers=
hostName=
name=
clientSecret=
clientKey=

[PackageUpdates]
packageUpdatesScheme=OFF|ON_NEXT_BOOT|ON_EVERY_BOOT
packageUpdatesURL=
trustedCert1=

[SyslogServerSettings1]
sysLogType=TCP
syslogCategory=ALL
syslogFormat=TEXT
syslogSettingName=
syslogSystemMessagesEnabledV2=true
syslogUrl=

[SyslogServerSettings2]
hostname=
port=6515
sysLogType=TLS
syslogCategory=ALL
syslogClientCertKeyPemV2=
syslogClientCertPemV2=
syslogServerCACertPemV2=
syslogFormat=TEXT
syslogSettingName=
syslogSystemMessagesEnabledV2=false

[SyslogServerSettings3]
mqttClientCertCertPem=
mqttClientCertKeyPem=
mqttServerCACertPem=
mqttTopic=
sysLogType=MQTT
syslogCategory=ALL
syslogFormat=TEXT
syslogSettingName=
syslogSystemMessagesEnabledV2=true
syslogUrl=

后续操作

如果要在保留现有设置的同时升级 Unified Access Gateway,请编辑 .ini 文件以将源引用更改为新版本,然后重新运行 .ini 文件:uagdeploy.ps1 uag1.ini。此过程最多可能需要 3 分钟的时间。

[General]
name=UAG1
source=C:\temp\euc-unified-access-gateway-3.2.1-7766089_OVF10.ova

如果要在没有服务中断的情况下进行升级,请参阅零停机时间升级

此页面对您有帮助吗?

对本主题提供反馈

本主题对您有帮助吗?

请勿填写任何个人信息或机密信息。

正在生成链接…