Restart-IISOnServers

Module: MO_Module
Applies to: Windows Servers on premises.

Use the Restart-IISOnServers function to target specific server or servers to restart IIS service on those servers.

Restart-IISOnServers

SYNOPSIS

Restart IIS on servers.

SYNTAX

Restart-IISOnServers [-Computer] <Object> [<CommonParameters>]

DESCRIPTION

Primarily designed to be used on Exchange servers, if IIS needs a restart, this function can be used on any servers running IIS. Load the parameter with a sinlge server or multiple servers wanting to process, then the invoke-command creates a remote connection to restart the IIS service.

EXAMPLES

EXAMPLE 1

Restart-IISOnServers -Computer PC1,PC2,PC3,PC4

This will restart IIS on the following computers: PC1, PC2, PC3, PC4

EXAMPLE 2

Restart-IISOnServers -Computer DC1

This will restart IIS on a single computer: DC1

PARAMETERS

-Computer

Enter a single server or multiple server names, separated by commas, to restart IIS on the target computer(s).

Type: Object
Parameter Sets: (All)
Aliases:

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

Enter a single name or multiple names separated by commas to restart IIS on servers.

Add a Comment