インストーラーの解凍だけはGUI必須だけど他は自動化した.
自動化した処理
- ArcGIS Web Adaptor 10.5をインストールする
- Web Adaptorを構成する
インストーラーを解凍する
Web_Adaptor_for_Microsoft_IIS_105_ja_155426.exeを実行する.
解凍先を適宜設定する.
「今すぐプログラムを実行」のチェックを外すこと.
インストーラーを実行する
- VDIR_NAMEにArcGISのWeb Adaptorの名前を設定する.
- VDIR_NAMEに「arcgis」を指定した場合, Web Adaptorには「 http://<gis_server_name>/arcgis/webadaptor 」で接続できる.
$arcGISWebAdaptorName = "arcgis"
$arcGISWebAdaptorSetupExe = "E:\ArcGISInstaller\WebAdaptorIIS_Japanese\setup.exe"
$arcGISWebAdaptorSetupArg = "/qn VDIR_NAME={0}" -f $arcGISWebAdaptorName
Start-Process -FilePath $arcGISWebAdaptorSetupExe -ArgumentList $arcGISWebAdaptorSetupArg -Verb runas -Wait
Web Adaptorを構成する
- Web Adaptorを構成することで「 http://<gis_server_name>/<webadaptor_name>/rest/services 」からArcGIS Serverのサービスを呼び出すことが出来るようになる.
$arcGISWebAdaptorName = "arcgis"
$webAdaptorURL = "http://<gis_server_name>/{0}/webadaptor" -f $arcGISWebAdaptorName
$serverURL = "http://<gis_server_name>:6443"
$admin_userName = "someone"
$admin_password = "pass"
$configureWebAdaptorExe = "C:\Program Files (x86)\Common Files\ArcGIS\WebAdaptor\IIS\Tools\ConfigureWebAdaptor.exe"
$configureWebAdaptorArg = "/m server /w {0} /g {1} /u {2} /p {3} /a true" -f $webAdaptorURL, $serverURL, $admin_userName, $admin_password
Start-Process -FilePath $configureWebAdaptorExe -ArgumentList $configureWebAdaptorArg -Verb runas -Wait