Adm 31 Administrative Scripting for iis using wmi alexis Eller Program Manager



Yüklə 486 Kb.
tarix07.11.2018
ölçüsü486 Kb.
#78687


ADM 331 Administrative Scripting for IIS 6.0 Using WMI


Agenda

  • Overview of the Windows Script Host

  • Manageability improvements in IIS 6.0

  • Overview of Windows Management Instrumentation

  • IIS 6.0 WMI Provider

  • Practical examples

  • Special notes regarding JScript & WMI



Overview of the Windows Script Host

  • Automation

  • Provisioning

  • Custom tools

  • Rich object model

    • Access to automation COM objects


Manageability Improvements in IIS 6.0

  • Metabase stored in XML

    • Editable while the server is running
    • Automatic versioning and history
  • Password protected backups

  • Import & Export

  • Command line administration

  • Remote administration

  • IIS WMI Provider





Command line Administration for IIS 6.0

  • Use the IIS WMI provider

  • Supplied VBScript scripts manage

    • Common web and FTP tasks
    • Use from command line, batch jobs
    • Serve as IIS WMI scripting examples
  • ADSI provider still supported

  • Create scripts using the IIS providers





In the System32 Directory

  • Web: iisweb.vbs, iisvdir.vbs

  • FTP: iisftp.vbs, iisftpdr.vbs

  • Metabase backup/restore: iisback.vbs

  • Import/export: iiscnfg.vbs

  • Application extensions, dependencies, files: iisext.vbs

  • Mapping between worker process and application pool: iisapp.vbs



WMI Overview

  • Introduced in Windows 2000

  • Uses the object oriented model

  • Universal way to access machine information

  • Consistent, unified view of managed objects

  • Supports SQL-like queries (WQL)





IIS 6.0 WMI Provider

  • Extends WMI schema to include IIS classes

  • Class/Instance provider

  • Method provider

  • IIS Namespace: root\MicrosoftIISv2



IIS 6.0 WMI Provider

  • Each IIS object available through WMI

    • IIsWebServer, IIsFtpServer, etc.
    • Similar to ADSI IIS classes
  • Separates read-only from read-write properties

    • IIsWebServer vs. IIsWebServerSetting
  • Association classes represent relationships



IIS 6.0 WMI Provider

  • New classes to represent structured data

    • ServerBinding, SecureBinding
    • ScriptMap, MimeMap
    • ApplicationDependency, WebSvcExtRestrictionList
    • HttpError, HttpCustomHeader, CustomErrorDescription






Going Deeper

  • Monitoring

    • Using notification queries
  • Security Audit

  • Bulk operations

  • Multiple operations













Scripting WMI Using JScript

  • Method Output Parameters

    • VBScript: Methods can be called directly
    • JScript: Methods are called with the SWbemMethod, InParam and OutParam objects.
  • WMI Arrays

    • VBScript: handle as usual
    • JScript: use the toArray() function to convert the WMI safearray to an array recognized by the JScript engine


Methods with OutParameters



Handling WMI Arrays in JScript



Call To Action

  • Consider Scripting

  • Leverage IIS WMI provider advantages

    • Unified object model
    • Querying capabilities
    • Monitoring capabilities
  • Review IIS 6.0 command line scripts

    • Use them
    • Learn from them


Ask The Experts Get Your Questions Answered



Community Resources

  • IIS Community Portal

    • http://www.microsoft.com/windowsserver2003/community/centers/iis/
  • IIS Portal

    • http://www.microsoft.com/iis
  • IIS Newsgroups

    • Microsoft.public.inetserver.iis
    • Microsoft.public.inetserver.iis.ftp
    • Microsoft.public.inetserver.iis.security
  • Third-party sites:

    • http://iisanswers.com
    • http://iisfaq.com


Suggested Reading & Resources

  • Using WMI to Manage IIS http://msdn.microsoft.com/library/en-us/iisref/htm/prog_wmi_using.asp

  • WMI Downloads – WMI Tools http://msdn.microsoft.com/downloads/list/wmi.asp

  • Writing WMI Scripts in JScript – describes how this is different from using VBScript http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/writing_wmi_scripts_in_jscript.asp

  • Enumerating WMI Namespaces (ie. What other WMI providers exist?) http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/scrguide/sas_wmi_khjg.asp



Additional IIS Resources

  • IIS 6.0 Deployment Guides:

    • Medium to Large Organizations http://www.microsoft.com/downloads/details.aspx?familyid=f31a5fd5-03db-46d2-9f34-596edd039eb9&displaylang=en
    • Small Organizations http://download.microsoft.com/download/d/a/7/da767448-6875-489c-96e6-2003e036de6d/06NT4IIS.doc
  • IIS 6.0 Resource Kit Tools http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en







Yüklə 486 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə