Reset-IISServer Manager

Resets the IISAdministration view of the IIS ServerManager.

Syntax

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
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.

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Aliases: cf
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Aliases: wi
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False