This repository contains scripts, code and samples for automating the install and configuration of ArcGIS (Enterprise and Desktop) using Microsoft Windows PowerShell DSC (Desired State Configuration).
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
Module Version
4.2.0
Affected Resource(s)
ArcGIS WebAdaptor
Version Base deployment
10.9.1
Problem
#For JAVA Web Adaptor we will always require AGSWEBADAPTORHOME to be set. $AGSWEBADAPTORHOME_Path = [environment]::GetEnvironmentVariable("AGSWEBADAPTORHOME","Machine") if([string]::IsNullOrEmpty($AGSWEBADAPTORHOME_Path)){ throw "AGSWEBADAPTORHOME environment variable is not set." }
The variable $AGSWEBADAPTORHOME_Path seems useless.
$JavaWAInstalls = (Get-ArcGISProductDetails -ProductName "ArcGIS Web Adaptor (Java Platform) $($Version)") $InstallObject = ($JavaWAInstalls | Select-Object -First 1) if($InstallObject.Version -imatch $Version){ $WAConfigFolder = Join-Path $InstallObject.InstallLocation $Context $WAConfigPath = Join-Path $WAConfigFolder 'webadaptor.config' if((Test-Path $WAConfigFolder) -and (Test-Path $WAConfigPath)){ [xml]$WAConfig = Get-Content $WAConfigPath $WAConfigSiteUrl = if($Component -ieq "Portal"){ $WAConfig.Config.WebServer.Portal.URL }else{ $WAConfig.Config.WebServer.GISServer.SiteURL } }else{ Write-Verbose "No config file found for webadaptor at '$($WAConfigFolder)'" $result = $False } }else{ throw "Installed Java Web Adaptor version doesn't match $Version" }
The comparison of version with -imatch doesn't work with AGE 10.9.1.
Community Note
Module Version
4.2.0
Affected Resource(s)
ArcGIS WebAdaptor
Version Base deployment
10.9.1
Problem
#For JAVA Web Adaptor we will always require AGSWEBADAPTORHOME to be set. $AGSWEBADAPTORHOME_Path = [environment]::GetEnvironmentVariable("AGSWEBADAPTORHOME","Machine") if([string]::IsNullOrEmpty($AGSWEBADAPTORHOME_Path)){ throw "AGSWEBADAPTORHOME environment variable is not set." }
The variable $AGSWEBADAPTORHOME_Path seems useless.
$JavaWAInstalls = (Get-ArcGISProductDetails -ProductName "ArcGIS Web Adaptor (Java Platform) $($Version)") $InstallObject = ($JavaWAInstalls | Select-Object -First 1) if($InstallObject.Version -imatch $Version){ $WAConfigFolder = Join-Path $InstallObject.InstallLocation $Context $WAConfigPath = Join-Path $WAConfigFolder 'webadaptor.config' if((Test-Path $WAConfigFolder) -and (Test-Path $WAConfigPath)){ [xml]$WAConfig = Get-Content $WAConfigPath $WAConfigSiteUrl = if($Component -ieq "Portal"){ $WAConfig.Config.WebServer.Portal.URL }else{ $WAConfig.Config.WebServer.GISServer.SiteURL } }else{ Write-Verbose "No config file found for webadaptor at '$($WAConfigFolder)'" $result = $False } }else{ throw "Installed Java Web Adaptor version doesn't match $Version" }
The comparison of version with -imatch doesn't work with AGE 10.9.1.