Esri / arcgis-powershell-dsc

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).
Apache License 2.0
120 stars 62 forks source link

[ArcGISLicense] ArcGIS Pro Single licensing not working. #528

Closed thbuchmann closed 9 months ago

thbuchmann commented 9 months ago

Community Note

Module Version

Affected Resource(s)

{
  "AllNodes": [
    {
      "NodeName": "[vmName]",
      "Role": ["Pro"]
    }
  ],
  "ConfigData": {
    "DownloadSetups": true,
    "DownloadPatches": true,
    "Credentials": {
      "AGOCredential": {
        "Password": "[Password]",
        "UserName": "[UserName]"
      }
    },
    "ProVersion": "3.2",
    "Pro": {
      "LicenseFilePath": "[LicenseFilePath]",
      "AuthorizationType": "[AuthorizationType]",
      "LockAuthSettings": "False",
      "BlockAddIns": "0",
      "SoftwareClass": "Professional",
      "AllUsers": "1",
      "EnableEUEI": "False",
      "CheckForUpdatesAtStartup": "False",
      "Installer": {
        "Path": "C:\\Software\\ArcGISPro_32_188049.exe",
        "InstallDir": "C:\\Program Files\\ArcGIS\\Pro",
        "DotnetDesktopRuntimeDownloadUrl": "https://download.visualstudio.microsoft.com/download/pr/52d6ef78-d4ec-4713-9e01-eb8e77276381/e58f307cda1df61e930209b13ecb47a4/windowsdesktop-runtime-6.0.25-win-x64.exe",
        "DotnetDesktopRuntimePath": "C:\\Software\\windowsdesktop-runtime-6.0.25-win-x64.exe",
        "PatchesDir": "C:\\Software",
        "PatchInstallOrder": ["ArcGIS_Pro_321_188069.msp"]
      }
    }
  }
}

Expected Behavior

Single Use license should be activated.

Actual Behavior

Single Use license is not activated. When you open ArcGIS Pro after the installation/licensing the Licensing dialog pops up. The verbose log looks like this:

2/16/2024 12:41:25 PM: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microso
ft/Windows/DesiredStateConfiguration'.
2/16/2024 12:41:25 PM: An LCM method call arrived from computer net-poc-pro with user sid S-1-5-21-2472708541-726850915-2292997705-500.
2/16/2024 12:41:25 PM: [net-poc-pro]: LCM:  [ Start  Set      ]
2/16/2024 12:41:30 PM: [net-poc-pro]: LCM:  [ End    Set      ]
2/16/2024 12:41:30 PM: Operation 'Invoke CimMethod' complete.
Trace-DSCJob : 2/16/2024 12:41:30 PM: Could not find mandatory property LicenseFilePath. Add this property and try again.
At C:\Program Files\WindowsPowerShell\Modules\arcgis\4.2.1\ArcGIS.psm1:261 char:5
+     Trace-DSCJob -Job $Job -JobName $ConfigurationName -DebugMode $De ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Trace-DSCJob

Steps to Reproduce

Run

Invoke-ArcGISConfiguration -ConfigurationParametersFile $Config -Mode InstallLicenseConfigure
thbuchmann commented 9 months ago

Ok, my fault. The Configuration file starting with module version 4.2.0 has changed. Although the variables reference doesn't show that.

The license file is now under "AllNodes":

"AllNodes": [
        {
            "NodeName": "[Machine Name 1]",
            "Role": [
                "Pro"
            ],
            "ProLicenseFilePath":"",
            "ProLicensePassword":""
        }
    ],

The old place under "Pro" still exists...!?

 "Pro": {
            "LicenseFilePath": "[License File Path - Pro ]"