Reset-IISServerManager
Resets the IISAdministration view of the IIS ServerManager.
Syntax
Default (Default)
Reset-IISServerManager
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Reset-IISServerManager cmdlet resets the IISAdministration view of the IIS ServerManager object and the view of .config file applicationHost.config to the current contents of the .config file.
Examples
Example 1: Reset the IISServerManager view of the configuration
PS C:\> $Sites = (Get-IISServerManager).Sites
PS C:\> $Sites["default web site"].Attributes["serverAutoStart"]
IsInheritedFromDefaultValue : True
IsProtected : False
Name : serverAutoStart
Schema : Microsoft.Web.Administration.ConfigurationAttributeSchema
Value : True
PS C:\> $Sites["default web site"].Attributes["serverAutoStart"].value = $false
PS C:\> $Sites["default web site"].Attributes["serverAutoStart"]
IsInheritedFromDefaultValue : False
IsProtected : False
Name : serverAutoStart
Schema : Microsoft.Web.Administration.ConfigurationAttributeSchema
Value : False
PS C:\> Reset-IISServerManager
Confirm
Are you sure you want to perform this action?
Performing the operation "Reset-IISServerManager" on target "ServerManager".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
PS C:\> $Sites = (Get-IISServerManager).Sites
PS C:\> $Sites["default web site"].Attributes["serverAutoStart"]
IsInheritedFromDefaultValue : True
IsProtected : False
Name : serverAutoStart
Schema : Microsoft.Web.Administration.ConfigurationAttributeSchema
Value : True
This command resets the IISServerManager view of the .config file after changes are made, and then demonstrates that the changed value is restored.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.