Modifier

Partager via


Enable-WebGlobalModule

Enables an IIS module.

Syntax

Enable-WebGlobalModule
      [-Name] <String>
      [-Type <String>]
      [-Precondition <String>]
      [-Force]
      [-Location <String[]>]
      [[-PSPath] <String[]>]
      [<CommonParameters>]
Enable-WebGlobalModule
      -InputObject <PSObject>
      [-Force]
      [-Location <String[]>]
      [[-PSPath] <String[]>]
      [<CommonParameters>]

Description

The Enable-WebGlobalModule cmdlet enables the specified Internet Information Services (IIS) module.

Examples

Example 1: Enable a module for a site

IIS:\> Enable-WebGlobalModule -Name "UriCacheModule" -PSPath "IIS:\sites\Default Web Site"

This command enables the module named UriCacheModule for the default website.

Parameters

-Force

Forces the module to be enabled.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies an input object that contains the module information.

Type:PSObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

Specifies the location in which this cmdlet enables the module.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the module to enable.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Precondition

Specifies a precondition for the module.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PSPath

Specifies the configuration path. This path can be either an IIS configuration path in the format computer name/webroot/apphost, or the IIS module path in the format IIS:\sites\Default Web Site.

Type:String[]
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Type

Specifies the managed type of the module.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False