Restart-WebItem
Restart-WebItem
Restarts an application pool or a Web site.
Syntax
Restart-WebItem [-Protocol <String>] [[-PSPath] <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]
Detailed Description
Use the Restart-WebItem cmdlets to recycle an application pool or a Web site.
Parameters
-Protocol <String>
The protocol binding of the item to restart (applies to sites only).
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-PSPath <String[]>
The path to the application pool or Web site.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
true (ByPropertyName) |
Position? |
2 |
-WarningAction <ActionPreference>
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-WarningVariable <String>
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CommonParameter
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
Input Type |
PSObject. |
Return Type |
PSObject. |
Notes
Examples
EXAMPLE 1: Recycle an Application Pool
IIS:\>Restart-WebItem 'IIS:\AppPools\DefaultAppPool'
Restarts the application pool named DefaultAppPool.