Stop-IISSite

Stops an IIS Web site.

Syntax

Stop-IISSite
    [-Name] <String>
    [-Passthru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Stop-IISSite cmdlet stops an existing site on the Internet Information Services (IIS) server.

Examples

Example 1: Stop an IIS website

PS C:\> Stop-IISSite -Name "Default Web Site"

This command stops the site named Default Web Site.

Required Parameters

-Name

Specifies the name of the IIS web site.

Type: String
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

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

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type: SwitchParameter
Position: Named
Default value: None
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

Inputs

String

Outputs

Microsoft.Web.Administration.Site