Edit

Share via


Restart-WebItem

Restarts an application pool or a website.

Syntax

Default (Default)

Restart-WebItem
    [-Protocol <String>]
    [[-PSPath] <String[]>]
    [<CommonParameters>]

Description

The Restart-WebItem cmdlet restarts an application pool or a website.

Examples

Example 1: Restart an application pool

IIS:\> Restart-WebItem -PSPath 'IIS:\AppPools\DefaultAppPool'

This command restarts the application pool named DefaultAppPool.

Parameters

-Protocol

Specifies the protocol binding of the item to restart. This parameter applies to sites only.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PSPath

Specifies the path to the application pool or web site.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
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.

Inputs

PSObject

Outputs

PSObject