description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. |
Microsoft.IIS.Powershell.Commands.dll-Help.xml |
IISAdministration |
12/20/2016 |
2.0.0 |
Disable-IISSharedConfig |
Disables IIS shared configuration.
Disable-IISSharedConfig [-DontRestoreBackedUpKeys] [-CopyRemoteConfigToLocalFiles] [<CommonParameters>]
The Disable-IISSharedConfig cmdlet disables the IIS shared configuration feature, and reverts to the keys that were backed up when shared configuration was enabled. IIS also reverts to the local applicationHost.config file that was used before shared configuration was enabled.
You can enable shared configuration through the IIS Administration Manager UI or the Enable-IISSharedConfig cmdlet.
If there are no backup keys for any reason, the cmdlet fails with a warning. To disable shared configuration in this scenario, you can use the DontRestoreBackedUpKeys parameter.
PS C:\> 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.
PS C:\> Disable-IISSharedConfig -DontRestoreBackedUpKeys
This command disables shared configuration. IIS subsequently uses the local applicationHost.config file in %WINDIR%\config. The backed up keys are deleted and are not restored.
PS C:\> Disable-IISSharedConfig -CopyRemoteConfigToLocalFiles
This command disables shared configuration. IIS copies the shared configuration locally and uses it. The backed up keys are deleted and are not restored.
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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).