V4. Getting Started - Esri/arcgis-powershell-dsc GitHub Wiki

Overview

The PowerShell DSC for ArcGIS module can be used to automate the deployment, configuration, upgrade, and patching of ArcGIS Enterprise, various ArcGIS Server Roles, ArcGIS Pro/Desktop, License Manager, and more on machines running Windows Operating Systems. Visit the Supported ArcGIS Software type and version page for a comprehensive list of supported ArcGIS Software and versions.


Below are the main steps to get started using the PowerShell DSC Module for ArcGIS to help your organization start managing ArcGIS Software using code:

  1. Ensure all infrastructure that will participate in the PowerShell DSC deployment is provisioned (For example: virtual machines, load balancers, storage accounts, S3 buckets, etc.)

  2. Ensure all operating system platform and system requirements are met.

  3. Obtain all SSL certificates, if necessary.

  4. Download installation, patches, and license files from My Esri. If the machines that will be participating in the deployment have internet access, the JSON configuration parameters file can be configured to automatically download the ArcGIS Software setups and download ArcGIS Software patches using an ArcGIS Online credential.

  5. Install the PowerShell DSC for ArcGIS Module on all nodes participating in the deployment (including the machine that will be used to run the Invoke-ArcGISConfiguration command-let)

  6. Create JSON configuration parameters file. To get started, visit the SampleConfigs page. There are resource here to help construct JSON Configuration Parameters files for ArcGIS Enterprise Base Deployment, ArcGIS Desktop/Pro, Additional ArcGIS Server Roles, etc.

  7. Run Invoke-ArcGISConfiguration command-let to Install, InstallLicnese, InstallLicenseConfigure, Upgrade, or Uninstall ArcGIS Software on the nodes defined in the JSON configuration file created above. Visit the PowerShell DSC for ArcGIS Module command line parameters page for a list of supported parameters.

System Requirements

Supported Operating System (OS) Platforms

  • Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, or Windows Server 2022

    • Windows Management Framework (WMF) 5.0 or 5.1. Typically, this comes pre-installed with the Operating System (OS). Run the following Powershell command to see which version is installed:
    $PSVersionTable

System Pre-requisites

Ensure the following on each node that will participate in the deployment process, including the orchestration machine. An orchestration machine is the machine that will be responsible for running the Invoke-ArcGISConfiguration command-let.

  • Set the PowerShell Execution Policy to Remote Signed.

    Set-ExecutionPolicy RemoteSigned
  • Ensure winrm is configured for Windows Remote Management.

    winrm quickconfig

    [!NOTE]
    By default the ArcGIS Module will use WinRM HTTP, port 5985, to make remote connections to the target nodes. However, starting with ArcGIS Module v3.3.0 and above, it is possible to use WinRM HTTPS, port 5986 instead of WinRM HTTP. If you plan to use WinRM HTTPS for the deployment, ensure the all pre-requistes are met prior to continuing.

  • It is recommended to set the Location Configuration Manager (LCM) ConfigurationMode to ApplyOnly and the ActionAfterReboot to StopConfiguration. For detailed steps please visit Microsoft's Configuring the Local Configuration Manager documentation.

Download ArcGIS Software and Additional Setup Files

  • Obtain any required SSL certificate files, if necessary
  • Download ArcGIS Software setup files and patches:
    • Option 1: Download files manually using My Esri for ArcGIS Software setup files and using the Technical Support page for ArcGIS Software patches.

      • Ensure the ArcGIS software and version of that software that will be deployed is listed as a supported ArcGIS software type and version.
      • If your ArcGIS deployment spans more than a single machine, then use one of the following options:
        • Add the installation files, licenses, and certificates to a file share. Grant permissions on the file share to the Local System Account of the machines on which installations needs to execute. The LCM component of PowerShell DSC runs as the Windows Local System Account.
        • Manually copy software installation files and Licenses to each of the target machines in the deployment.
    • Option 2: Download and Install using PowerShell DSC Module for ArcGIS

      [!IMPORTANT]
      This option requires that all nodes participating in the deployment have access to the internet.


Note

It is possible to mix and match the above-mentioned options for downloading software setups and patches. For example, patches could be downloaded and staged on each respective node (Option 1) and ArcGIS Software setup files can be downloaded automatically using the PowerShell DSC Module for ArcGIS (Option 2).

Install PowerShell DSC Module for ArcGIS

Option 1: Using the artifacts from GitHub

  • Use Git to clone the repository to your local machine (e.g: c:\arcgis-automation-dsc)

  • Add the "ArcGIS" Module folder to your PsModulePath or copy the modules into the default PowerShell Modules folder (e.g:- C:\Program Files\WindowsPowerShell\Modules)

    • If your deployment spans multiple nodes, please reference the Scripts to push ArcGIS Module page for instructions on how to automatically install the PowerShell DSC Module for ArcGIS
  • Run the PowerShell command below on each node to confirm the ArcGIS Module is the same on each machine:

    Get-Module -ListAvailable -Name 'ArcGIS'

Option 2: Using the artifacts from PowerShell Gallery

  • Open PowerShell command-let as an Administrator

  • Run the following PowerShell command:

    Install-Module -Name ArcGIS
  • Follow the additional prompts for downloading the PowerShell DSC Module for ArcGIS from the PowerShell Gallery.

  • Run the PowerShell command below on each node to confirm the ArcGIS Module is the same on each machine:

    Get-Module -ListAvailable -Name 'ArcGIS'

Warning

Regardless of how the PowerShell DSC Module for ArcGIS is installed, the version of the PowerShell DSC Module must be the same on all nodes participating in the deployment (including the orchestration machine). If you need to upgrade the PowerShell DSC Module for ArcGIS on any of the nodes, please visit this page for instructions on how to Upgrade the PowerShell DSC Module for ArcGIS.

Create JSON Configuration Parameters File

A JSON configuration parameter file is used to define how and where ArcGIS Software components are installed, licensed, and configured on the participating nodes. This file acts as a human-readable "blueprint" of how the ArcGIS Software components are installed and configured, making this configuration file easy to share and interpret by others. Visit the SampleConfig parameter files page for examples based on which ArcGIS Software components are installed.

Below are the main steps used to create JSON Configuration Parameters file for deployment:

  • Download sample configuration files from the GitHub repository.
  • Make a copy of the sample JSON configuration file that meets the deployment requirements
  • Modify the desired JSON configuration file for the parameters of the intended deployment. Visit the variables reference page for available attributes and their definitions to help populate the JSON configuration files
  • Save this JSON configuration file on the node that will be used to run Invoke-ArcGISConfiguration command-let (orchestration node)

Run Invoke-ArcGISConfiguration Command-let

  • On the orchestration node, open a PowerShell window as an Administrator

  • Change directories to a desired location for output log files. While the PowerShell DSC for ArcGIS Module is running, log files will be generated for each participating node in the deployment.

    • For example, change to a directory called deploy:

      Set-Location -Path "C:\deploy"
  • Run the Invoke-ArcGISConfiguration command-let and provide the path to the configuration file as an input parameter. -Mode and -Credential are optional arguments. When -Mode isn't specified it will default to InstallLicenseConfigure. Visit the Additional PowerShell DSC for ArcGIS command line parameters page for a full list of command line parameters.

    Invoke-ArcGISConfiguration -ConfigurationParametersFile [[Path to Configuration json File]] -Mode [Install | InstallLicense | InstallLicenseConfigure | Uninstall | Upgrade] -Credential [Config RunAs - Optional] 
⚠️ **GitHub.com Fallback** ⚠️