Windows Server · Risk: Critical · Documentation Verified
Last verified: 2026-10-26
Microsoft IISAdministration reference: Disables IIS shared configuration. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Disable-IISSharedConfig. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / IISAdministration · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-CopyRemoteConfigToLocalFiles
Copies remote configuration over the local version of applicationHost.config before disabling shared configuration. The version of the applicationHost.config file that was used before enabling shared configuration is overwritten. The backup keys are also deleted, because those keys would only work with the overwritten version of applicationHost.config. IIS continues to use the active keys that worked with shared configuration, which is now the local configuration.
-DontRestoreBackedUpKeys
Indicates that this operation does not restore backed up keys. If you do not specify the *CopyRemoteConfigToLocalFiles* parameter, IIS reverts to using its local copy of applicationHost.config, and uses the active keys for the shared configuration. If the local copy of the applicationHost.config file had secrets encrypted with keys other than the currently active ones, IIS will no longer be able to decrypt those secrets. You must re-enter and re-encrypt these secrets for the features that depend on them. *DontRestoreBackedUpKeys* is useful in scenarios where backup keys are deleted but the IIS administrator wants to disable shared configuration. This parameter is ignored if you specify the *CopyRemoteConfigToLocalFiles* parameter, because the backed up keys are not restored in that case. In any circumstance, backed up keys are deleted when a shared configuration is disabled.
Prerequisites
Windows with the IISAdministration module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Disable shared configuration and restore keys
Disable-IISSharedConfig
This command disables shared configuration. IIS subsequently uses the local applicationHost.config file in %WINDIR%\config. The backed up keys are restored to the local key store and deleted. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.