Set-WebSitesServer

Enables or disables a website server.

Syntax

Set-WebSitesServer
   [-Name] <String>
   [-Offline] <Boolean>
   [-RemoteSettings <RemoteSettings>]
   [-SuppressRequestIdLine]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-WebSitesServer cmdlet enables or disables a website server. If a server is disabled users will not be able to access websites associated with that server.

Examples

Example 1: Enable a server

PS C:\> Set-WebSitesServer -Name "WSERVER01" -Enabled

This command enables the server WSERVER01.

Example 2: Disable a server

PS C:\> Set-WebSitesServer -Name "WSERVER01"

This command disables the server WSERVER01. This is done by leaving out the Enabled parameter.

Required Parameters

-Name

Specifies the name of the name of the server being enabled or disabled. For example:

-Name "ContosoServer"

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Offline

{{Fill Offline Description}}

Type:Boolean
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-RemoteSettings

{{Fill RemoteSettings Description}}

Type:RemoteSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SuppressRequestIdLine

{{Fill SuppressRequestIdLine Description}}

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