Uninstall an ArcGIS Enterprise deployment - Esri/arcgis-powershell-dsc GitHub Wiki

If you want to uninstall an ArcGIS Enterprise, ArcGIS Pro or ArcGIS Desktop deployment you had installed using the PowerShell DSC Module, you can do so by running the same command as for installation. Note that uninstalling is not required in order to upgrade your ArcGIS Enterprise deployment to a new version; the PowerShell DSC Module is capable of running an in-place upgrade using the Invoke-ArcGISConfiguration cmdlet.

Learn how to upgrade ArcGIS Enterprise with the PowerShell DSC Module (link)

Uninstall a deployment

Retrieve your JSON configuration file(s). Unlike with installation or upgrade, you do not need to modify your JSON configuration file(s) before running an uninstall. The JSON configuration files you provide to the cmdlet as an input parameter should be identical to what you provided at install time.

In PowerShell DSC, run the Invoke-ArcGISConfiguration cmdlet and provide the JSON configuration files as an input parameter. If you have multiple configuration files, provide them in a comma-separated list. Credential, DebugSwitch is an optional argument.

Invoke-ArcGISConfiguration -ConfigurationParametersFile [Path to Configuration JSON File(s)](/Esri/arcgis-powershell-dsc/wiki/Path-to-Configuration-JSON-File(s)) -Mode Uninstall -Credential [Config RunAs - Optional] -DebugSwitch

The cmdlet will uninstall all software and remove all ArcGIS Enterprise system files from your machine.