Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Reset-IISServerManager

Brian Lich|Last Updated: 3/30/2017

SYNOPSIS

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.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
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
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Get-IISServerManager

IIS Administration Cmdlets for Windows PowerShell

© 2017 Microsoft