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 執行個體之前刪除舊版應用裝置。
- 請確認系統需求適當且可供使用。
程序
-
從 Customer Connect 入口網站將 Unified Access Gateway OVA 下載到您的機器。
-
將 uagdeploy-XXX.zip 檔案下載到機器上的資料夾。
您可以從 Unified Access Gateway 的 Customer Connect 頁面取得
ZIP檔案。 -
開啟 PowerShell 指令碼,並將目錄修改為指令碼的所在位置。
-
為 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.pemopenssl pkcs12 -in cert.pfx -nodes -nocerts -out key.pemopenssl rsa -in key.pem -check -out keyrsa.pem -
INI 檔案中包含的
[adminSAMLSettings]用於設定 SAML 驗證方法,以對具有管理員 UI 之管理員存取權的使用者進行驗證。這裡,entityId是指外部中繼資料提供者實體識別碼。 -
具有監控角色的低權限管理員使用者的密碼,會以參數的形式提供給 PowerShell 指令碼。如果未提供密碼,則系統會提示使用者輸入密碼。提供參數作為
newAdminUserPwd,而其參數值類似於monitoringUser1:P@ssw0rd1;monitoringUser2:P@ssw0rd2。INI 檔案中的enabled參數為選用,如果參數無法使用,則預設為 true。
-
-
若要確保指令碼的執行不會受限,請輸入 PowerShell
set-executionpolicy命令。set-executionpolicy -scope currentuser unrestricted**附註:**您只需要執行一次來移除此限制。
如果指令碼顯示警告,請執行以下命令以解除警告:unblock-file -path .\uagdeploy.ps1 -
執行該命令以開始部署。如果您未指定
.INI檔案,指令碼的預設值為ap.ini。.\uagdeploy.ps1 -iniFile uag1.ini -
當出現提示時,請輸入認證並完成指令碼。
**附註:**如果系統提示您新增目標機器的指紋,請輸入 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
[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
如果您想要在服務不中斷的情況下升級,請參閱不停機升級。
此頁面對您有幫助嗎?