Compartir a través de


GlobalModulesSection (clase)

Expone las opciones de configuración de los módulos globales de IIS.

Sintaxis

class GlobalModulesSection : ConfigurationSectionWithCollection  

Métodos

La siguiente tabla muestra los métodos expuestos por la clase GlobalModulesSection.

Nombre Descripción
Add (Agregar) (Se hereda de ConfigurationSectionWithCollection).
Borrar (Se hereda de ConfigurationSectionWithCollection).
Get (Se hereda de ConfigurationSectionWithCollection).
GetAllowDefinition (Se hereda de ConfigurationSection).
GetAllowLocation (Se hereda de ConfigurationSection).
Remove (Se hereda de ConfigurationSectionWithCollection).
RevertToParent (Se hereda de ConfigurationSection).
SetAllowDefinition (Se hereda de ConfigurationSection).
SetAllowLocation (Se hereda de ConfigurationSection).

Propiedades

La siguiente tabla muestra las propiedades expuestas por la clase GlobalModulesSection.

Nombre Descripción
GlobalModules Matriz de objetos GlobalModuleElement.
Location (Se hereda de ConfigurationSection). Una propiedad clave.
Path (Se hereda de ConfigurationSection). Una propiedad clave.
SectionInformation (Se hereda de ConfigurationSection).

Subclases

Esta clase no contiene subclases.

Comentarios

La sección <globalModules> del archivo ApplicationHost.config especifica los módulos nativos a nivel de servidor. Puede habilitar estos módulos agregando sus nombres a la sección <modules> en el nivel de configuración deseado en ApplicationHost.config o en un archivo Web.config. En WMI, puede hacerlo mediante el método Add de la clase ModulesSection.

Ejemplo

En el ejemplo siguiente se enumeran los módulos de la sección <globalModules>.

' Connect to the WMI WebAdministration namespace.  
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")  
  
' Get the ApplicationHost.config <globalModules> section.  
Set oSection = oWebAdmin.Get( _  
    "GlobalModulesSection.Path=" & _  
    "'MACHINE/WEBROOT/APPHOST/',Location=''")  
  
' Display the path.  
WScript.Echo  
WScript.Echo "Path: " & oSection.Path  
WScript.Echo  
  
' Display the global modules.  
WScript.Echo "Global Modules"  
WScript.Echo "--------------"  
For Each oGMElement In oSection.GlobalModules  
     WScript.Echo "Module: " & oGMElement.Name  
     WScript.Echo "Image: " & oGMElement.Image  
     WScript.Echo "PreCondition: " & oGMElement.PreCondition  
     WScript.Echo  
Next  

Jerarquía de herencia

ConfigurationSection

ConfigurationSectionWithCollection

GlobalModulesSection

Requisitos

Tipo Descripción
Remoto - IIS 7.0 en Windows Vista
- IIS 7.5 en Windows 7
- IIS 8.0 en Windows 8
- IIS 10.0 en Windows 10
Server - IIS 7.0 en Windows Server 2008
- IIS 7.5 en Windows Server 2008 R2
- IIS 8.0 en Windows Server 2012
- IIS 8.5 en Windows Server 2012 R2
- IIS 10.0 en Windows Server 2016
Producto - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
Archivo MOF WebAdministration.mof

Consulte también

ConfigurationSection (clase)
ConfigurationSectionWithCollection (clase)
GlobalModuleElement (clase)
ModulesSection (clase)