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
113 stars 61 forks source link

ArcGISFederation fails when multiple versions of the ArcGIS Module are installed. #116

Closed hmelendez closed 4 years ago

hmelendez commented 5 years ago

debugSwitch.log I use the Upgrade-Module command to install the latest version of the ArcGIS Module. This actually adds the new version and retains the previous one. When deploying a new site the ArcGIS Federation fails to compile with the included errors. Uninstalling the older versions of the module will remediate the issue. Get-InstalledModule -Name "ArcGIS" -RequiredVersion 1.1.3 | Uninstall-Module

shailesh91 commented 5 years ago

@hmelendez Will look into the given issue.

pfoppe commented 5 years ago

Is there a best practice/workflow for managing arcgis modules?

I started with the ArcGIS 2.0.0 module with the v10.6.1 installs. I've pushed the latest 2.1.0 to all machines as described here - https://github.com/Esri/arcgis-powershell-dsc/wiki/Scripts-to-push-the-ArcGIS-Module

And the upgrade documentation states - https://github.com/Esri/arcgis-powershell-dsc/wiki/Upgrade-an-ArcGIS-Enterprise-deployment When you have deployed ArcGIS Enterprise using the PowerShell DSC Module, you can easily and quickly upgrade to each new version of the software. You do not need to uninstall any software component.

However, I can see that the arcgis 2.0.0 and 2.1.0 are both installed on the system and the Configure-ArcGIS command failed with the following:

Dot Sourcing the Configuration:- ArcGISLicense
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\2.0.0\Configurations-OnPrem\ArcGISLicense.ps1:4 char:5
+     Import-DscResource -ModuleName ArcGIS
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Multiple versions of the module 'ArcGIS' were found. You can run 'Get-Module -ListAvailable -FullyQualifiedName
ArcGIS' to see available versions on the system, and then use the fully qualified name '@{ModuleName="ArcGIS";
RequiredVersion="Version"}'.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MultipleModuleEntriesFoundDuringParse

I'm going to manually remove the ArcGIS 2.0.0 module from the systems and see if this resolves the immediate issue... however I'm trying to avoid manual work as I've already got ~15 servers up and running with the PSDSC apporach, and have plans for hundreds more.

Thanks!

cameronkroeker commented 4 years ago

Hello @pfoppe,

This issue has been addressed in the latest release, v3.0.0:

https://github.com/Esri/arcgis-powershell-dsc/releases/tag/v3.0.0

Thanks, Cameron