Flylib.com
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635
BUY ON AMAZON
Windows 2000 Scripting Guide
Introduction
Compact Disc
Document Conventions
Support Policy
Scripting Concepts and Technologies for System Administration
Introduction to Windows Script Technologies
VBScript Primer
VBScript Overview
Working with Objects
Connecting to Objects
Creating an Object Reference
Calling Methods
Retrieving Properties
Variables
Constants
Strings
Strings as Variables
Concatenating Strings
Collections
For Each
Collections with Zero Items
Looping
For Next
Making Decisions
Taking Multiple Actions by Using If Then Else
Arrays
Input
Error Handling
Using the Err Object
Clearing Errors
VBScript Reference
Working with Variables
Initializing Variables
Using Constants
Defining Constants
Using Intrinsic Constants
VBScript Data Types
Working with Dates and Times
Retrieving Current Date and Time Values
Verifying That a Value Is a Date
Retrieving Specific Portions of a Date and Time Value
Date Arithmetic
Formatting Date and Time Values
Working with Strings
Manipulating Strings and String Lengths
Searching for Text in a String
Modifying String Case
Working with Numbers
Arithmetic Precedence
Formatting Numbers
Formatting Percentages
Running Statements Multiple Times
Do Loop
Checking the Loop Condition
Exiting a Loop
Making Decisions
Testing Multiple Conditions
If Then ElseIf
Select Case
Arrays
Creating Arrays
Creating Dynamic Arrays
Converting a Delimited String to an Array
Alternatives to Using Arrays
Error Handling
Handling Run-Time Errors
Toggling Error Handling
Handling Errors in COM Objects
Procedures
Calling a Procedure
Functions
Recursion
COM Objects
The COM Process
Binding
Choosing a Method for Binding to an Automation Object
Verifying Object References
Unloading Objects from Memory
WSH Primer
WSH Overview
WSH Architecture
Components of the WSH Environment
How the Components of the WSH Environment Work Together
WSH Object Model
Running WSH Scripts
Running Scripts from the Command Line
Scheduling the Running of Scripts
Other Methods of Running Scripts
WSH Objects
WScript Object
Using COM Objects
Handling Input and Output
Working with Command-Line Arguments
Controlling How a Script Runs
Obtaining WSH Environment Information
Handling Events
WshShell Object
Running Programs
Working with Shortcuts
Working with Special Folders
Environment Variables
Logging an Event
Reading From and Writing to the Local Registry
Sending Keystrokes to a Program
Retrieving and Changing a Script s Current Working Directory
Displaying Timed Message Boxes
WshNetwork Object
Managing Network Drives
Managing Network Printers
Obtaining User and Computer Information
WshController Object
Running Scripts on Remote Computers
Monitoring Status of Remotely Running Scripts
Examining Errors Produced by Remotely Running Scripts
Limitations of Remote WSH
Securing Scripts
Digitally Signing Scripts
Enforcing the Use of Signed Scripts
Programmatically Signing a Script
Programmatically Verifying a Signed Script
Restricting the Ability to Run Scripts
Disabling Windows Script Host
Script Runtime Primer
Script Runtime Overview
FileSystemObject
Managing Disk Drives
Returning a Collection of Disk Drives
Binding to a Specific Disk Drive
Enumerating Disk Drive Properties
Ensuring That a Drive is Ready
Managing Folders
Binding to a Folder
Verifying That a Folder Exists
Creating a Folder
Deleting a Folder
Copying a Folder and Its Contents
Moving a Folder and Its Contents
Renaming a Folder
Using Folder Properties
Enumerating Folder Properties
Managing Folder Attributes
Changing Folder Attributes
Enumerating the Files in a Folder
Enumerating Subfolders
Managing Files
Binding to a File
Verifying That a File Exists
Deleting a File
Copying a File
Moving a File
Renaming a File
Retrieving File Properties
Enumerating File Attributes
Configuring File Attributes
Parsing File Paths
Retrieving the File Version
Reading and Writing Text Files
Reading Text Files
Writing to Text Files
Dictionary Object
Creating a Dictionary
Configuring Dictionary Properties
Adding Key-Item Pairs to a Dictionary
Manipulating Keys and Items in a Dictionary
Determining the Number of Key-Item Pairs in a Dictionary
Enumerating Keys and Items in a Dictionary
Verifying the Existence of a Specific Key
Modifying an Item in a Dictionary
Removing Key-Item Pairs from a Dictionary
ADSI Scripting Primer
ADSI Overview
ADSI Scripting Fundamentals
Primary ADSI Scripting Tasks
Creating Directory Service Objects
Modifying Directory Service Objects
Reading Attributes of Directory Service Objects
Deleting Directory Service Objects
Comparing the Primary Scripting Tasks
Building ADSI Scripts
Step 1: Establishing a Connection
Step 2: Performing a Task
Step 3: Committing to Active Directory
Performing Multiple Scripting Tasks
Advanced ADSI Scripting Operations
Administering Multivalued Attributes
Modifying Multivalued Attributes
Reading Multivalued Attributes
Data Caching
Making Explicit Calls by Using the GetInfo Method
Making Explicit Calls by Using the GetInfoEx Method
Copying, Moving, and Renaming Objects
Copying Objects
Moving and Renaming Objects
Searching
Searching Active Directory
Optimizing Search Performance
Performing an Administrative Task Using a Result Set
Enumerating Active Directory Objects in Containers
Scripting Container Enumeration
Root Directory Service Entry
Scripting with rootDSE
Active Directory Architecture
Physical Architecture
Logical Structure
Classes and Attributes
Active Directory Replication and Indexing
Operational Attributes
ADSI Architecture
ADSI Layers
ADSI Interfaces
WMI Scripting Primer
WMI Overview
WMI Architecture
Managed Resources
WMI Infrastructure
WMI Consumers
WMI Security
WMI Namespace-Level Security
DCOM Security
Standard Windows Operating System Security
Common Information Model
Blueprint for Management
Namespaces
Class Categories
CIM Class Types
Components of a Class
Exploring the CIM Repository
WMI Scripting Library
WMI Scripting Library Object Model
SWbemLocator
SWbemServices
Writing WMI Scripts
Connecting to WMI Using the WMI Moniker
The WinMgmts: Prefix
WMI Security Settings
Using WMI Object Paths
Retrieving Managed Resources Using WMI Query Language
Returning All Properties of All Instances of a Class
Returning Selected Properties of All Instances of a Class
Returning All Properties of Selected Instances of a Class
Creating Targeted Queries Using AND or OR
Returning Selected Properties of Selected Instances of a Class
Creating Faster Queries by Using a Forward-only Enumerator
Working with Dates and Times
Converting WMI Dates to a Standard Date-Time Format
Converting a Standard Date to a WMI Date-Time Format
Creating Scripts Based on WMI Templates
Retrieving and Displaying Properties of a Managed Resource
Retrieving and Displaying All Properties of a Managed Resource
Writing Resource Properties
Calling Methods
Creating Resources
Deleting Resources
Monitoring Resources by Using WMI Event Notifications
Three Steps in a WMI Monitoring Script
How WMI Event Notification Works
Enhanced WMI Monitoring Scripts
Scripting Solutions for System Administration
Active Directory Users
User Account Overview
Active Directory User Accounts
Active Directory User Account Objects
User Account Types
Identification Attributes
Creating User Accounts
Configuring User Account Passwords
Setting User Account Passwords
Changing User Account Passwords
Reading User Account Password Attributes
Displaying Password Attributes Accessible from userAccountControl
Determining When a Password Was Last Set
Configuring User Account Password Attributes
Changing Flags in the userAccountControl Attribute
Configuring a Password Change at Next Logon Requirement
Managing User Accounts
Enabling or Disabling a User Account
Determining Whether an Account Is Enabled or Disabled
Reading and Writing User Account Attributes
Reading Attributes
Writing Values to the Attributes
Modifying a Multivalued Attribute
Clearing Attributes
Copying, Moving, and Renaming User Accounts
Copying User Accounts
Moving and Renaming User Accounts
Deleting User Accounts
Searching Active Directory for User Accounts
Searching for an Attribute in a Container
Limiting a Search for an Attribute in a Container to User Account Types
Searching for a User Account Attribute in a Container and Its Subcontainers
Verifying That an Attribute Is Unique in the Forest
Searching for Empty Attribute Values
Using Wildcards in Search Filters
Searching for Multivalued Attributes
Sorting the Result Set
Modifying Multiple User Accounts by Using the Result Set from a Search
Managing User Accounts by Enumeration
Limiting Enumeration with Filters and Hints
Computer Assets
Computer Assets Overview
Retrieving System Information
Retrieving BIOS Information
Retrieving Information About the BIOS
Retrieving Identifying Information by Using the SMBIOS
Inventorying Computer Hardware
Taking Inventory of Computer Hardware
Identifying the Chassis Type of a Computer
Managing Operating Systems
Identifying the Name and Version Number of the Operating System
Retrieving the Properties of the Operating System
Identifying the Latest Installed Service Pack
Enumerating Installed Hot Fixes
Managing WMI Settings
Enumerating WMI Settings
Configuring WMI Settings
Managing Software
Enumerating Software
Enumerating Installed Software
Enumerating Installed Software Features
Installing, Upgrading, and Removing Software
Installing Software on the Local Computer
Installing Software on a Remote Computer
Upgrading Software
Removing Software
Managing Computer States
Managing Computer Startups
Enumerating Computer Startup Options
Configuring Computer Startup Options
Enumerating Computer Startup Commands
Managing Computer Recovery Options
Enumerating Computer Recovery Options
Configuring Computer Recovery Options
Querying the Event Log for Stop Events
Shutting Down Computers and Logging Off Users
Shutting Down a Computer
Restarting a Computer
Monitoring Changes in Computer Power Status
Computer Roles
Computer Roles Overview
Managing Computer Accounts
Retrieving Basic Logon and Computer Information
Creating Computer Accounts
Deleting Computer Accounts
Deleting Specified Computer Accounts
Modifying Computer Accounts
Enumerating Computer Account Attributes
Configuring the Computer Account Location Attribute
Renaming Computer Accounts
Moving Computer Accounts
Resetting Computer Account Passwords
Searching for Computer Accounts in Active Directory
Enumerating All the Computer Accounts in Active Directory
Locating Computer Accounts Based on Their Attributes
Managing Computer Roles
Identifying Computer Roles
Identifying the Role of a Computer Based on the Service It Provides
Identifying Active Directory-Specific Roles
Enumerating Domain Controllers
Identifying the Current Domain Controller for a Computer
Identifying Operations Master Roles
Identifying Global Catalog Servers
Enabling or Disabling Global Catalog Servers
Disks and File Systems
Disks and File Systems Overview
Managing and Monitoring Disk Drives
Managing Disk Partitions
Managing Logical Disk Drives
Identifying Drives and Drive Types
Changing Logical Disk Volume Names
Managing Disk Space
Enumerating Disk Space on a Computer
Enumerating Disk Space by User
Monitoring Free Disk Space in Real-Time
Managing Disk Quotas
Managing Disk Quotas on the NTFS File System
Enumerating Disk Quota Settings
Enabling and Disabling Disk Quotas
Configuring Default Disk Quota Settings
Managing Disk Quotas for Individual Users
Enumerating Disk Quotas
Adding a New Disk Quota Entry
Modifying a Disk Quota Entry
Deleting a Disk Quota Entry
Managing File Systems
Identifying the File System Type
Enumerating NTFS Properties
Modifying NTFS Properties
Managing Page Files
Monitoring Page File Use
Configuring Page File Properties
Files and Folders
Files and Folders Overview
Managing Files and Folders Using WMI
Comparing WMI and the FileSystemObject
Managing Files and Folders Using the Windows Shell Object
Folders and Folder Objects
Enumerating Folders and Folder Properties
Enumerating All the Folders on a Computer
Enumerating the Subfolders of a Folder
Enumerating a Specific Set of Folders
Enumerating Folders by Date
Enumerating Special Folders
Enumerating the Items in a Special Folder
Binding to a Folder by Using the Browse For Folder Dialog Box
Managing Folders
Renaming Folders
Moving Folders by Using the Rename Method
Copying Folders by Using WMI
Copying Folders by Using the Shell Folder Object
Moving Folders by Using the Shell Folder Object
Deleting Folders
Compressing and Uncompressing Folders
Files and File Objects
Enumerating Files and File Properties
Retrieving Extended File Properties
Enumerating All the Files on a Computer
Using an Asynchronous Query to Enumerate All the Files on a Computer
Enumerating All the Files in a Folder
Enumerating a Specific Set of Files
Managing Files
Renaming Files
Changing File Name Extensions
Copying Files
Deleting Files
Performing Actions on Files
Identifying Shell Object Verbs
Monitoring the File System
Monitoring File Creation
Monitoring File Deletion
Monitoring File Modification
Managing Shared Folders
Enumerating Shared Folders
Creating Shared Folders
Mapping Shared Folders to Local Folders
Deleting Shared Folders
Modifying Shared Folder Properties
Publishing Shared Folders in Active Directory
Managing Published Folders
Enumerating Published Folders
Searching for Published Folders in Active Directory
Deleting a Published Folder in Active Directory
Logs
Logs Overview
Managing Logs
Managing Event Logs
Retrieving Event Log Properties
Configuring Event Log Properties
Backing Up and Clearing Event Logs
Creating Unique File Names When Backing Up Event Logs
Querying Event Logs
Querying a Specific Event Log
Querying an Event Log for a Subset of Events
Retrieving Event Log Records from a Specified Day
Asynchronously Retrieving Event Log Statistics
Copying Events to a Database
Writing Events to Event Logs
Writing to Event Logs
Creating Detailed Event Log Entry Descriptions
Creating Custom Event Logs
Managing Plain-Text Logs
Parsing Comma-Separated-Values Logs
Parsing Fixed-Width Logs
Printing
Printing Overview
Monitoring Printers, Print Queues, and Print Jobs
Monitoring Printers
Monitoring Printer Status
Monitoring Printer Status in Real Time
Filtering Printer Status Displays
Monitoring Printer Status by Using a Temporary Event Subscription
Verifying the Status of the Print Service
Monitoring Printer Workloads
Reporting Print Queue Statistics
Monitoring Print Jobs
Monitoring Print Job Status
Monitoring the Time Print Jobs Spend in a Print Queue
Managing Printer Operations, Print Queues, and Print Jobs
Managing Printer Operations
Enumerating Printers and Print Capabilities
Pausing Printers
Resuming Printers
Managing Print Queues
Purging Print Queues
Managing Print Jobs
Pausing Print Jobs
Resuming Print Jobs
Configuring Printers and Print Jobs
Configuring Printer Properties
Configuring Printer Availability
Tracking Printer Locations
Enabling Printer Location Tracking
Configuring Printer Locations
Configuring Print Jobs
Configuring Print Job Properties
Managing Printer Connections on Client Computers
Enumerating Printer Connections
Adding and Deleting Printer Connections
Adding a Printer Connection by Using WSH
Removing a Printer Connection
Searching for Printers in Active Directory
Enumerating All the Published Printers in a Domain
Searching for Specific Printers in a Domain
Processes
Processes Overview
Managing Processes
Monitoring Processes
Monitoring Processes for Availability
Monitoring Processes for Reliability
Monitoring Processes for Performance
Displaying Current Process Performance Data
Enumerating Additional Process Properties
Determining Process Owners
Monitoring Threads
Creating and Terminating Processes
Creating Processes
Modifying Process Startup Options
Terminating Processes
Services
Services Overview
Monitoring Services
Monitoring Service Availability
Monitoring Service Reliability
Retrieving Service Properties
Enumerating Service Properties
Identifying the Services Running in a Process
Changing Service State
Determining Which Services Can Be Stopped or Paused
Stopping or Pausing Services
Starting or Resuming Services
Enumerating Dependent and Antecedent Services
Enumerating Dependent Services
Enumerating Antecedent Services
Stopping and Starting Dependent Services
Configuring Services
Configuring Service Start Options
Configuring Error Control Codes for Autostart Services
Managing Service Accounts and Service Account Passwords
Configuring Service Accounts
Configuring Service Account Passwords
Installing and Removing Services
Installing Services
Removing Services
Registry
Registry Overview
Managing the Registry
Backing Up the Registry
Reading Entry Values and Types
Reading String-valued and DWORD-valued Entries
Reading a Multistring-valued Entry
Reading an Expanded String-valued Entry
Reading a Binary-valued Entry
Changing String-valued and DWORD-valued Entries
Creating Registry Subkeys and Entries
Creating a Subkey
Creating String-valued and DWORD-valued Entries
Creating Multistring-valued Entries
Creating Expanded String-valued Entries
Enumerating Keys, Subkeys, and Entries
Enumerating Subkeys of a Key or Subkey
Enumerating Entry Names, Values, and Data Types
Deleting Subkeys and Entries
Deleting Registry Entries
Deleting a Registry Subkey
Checking Registry Subkey Access Rights
Monitoring the Registry
Monitoring Subtree-Level Events
Monitoring Subkey-Level Events
Monitoring Entry-Level Events
Scripting for the Enterprise
Creating Enterprise Scripts
Enterprise Scripts Overview
Retrieving Arguments
Retrieving Arguments from a Text File
Using a Text File as a Command-Line Argument
Retrieving Arguments from a Database
Retrieving Arguments from an Active Directory Container
Displaying Output
Displaying Tabular Script Output in a Command Window
Displaying Data by Using Internet Explorer
Displaying Data in a Web Page
Stopping a Script When Internet Explorer Is Closed
Working with HTML Applications
Displaying Script Output by Using the Tabular Data Control
Sorting Data by Using the Tabular Data Control
Filtering Data by Using the Tabular Data Control
Sorting Data by Using a Disconnected Recordset
Working with Databases
Connecting to a Database
Adding New Records to a Database
Finding Records in a Recordset
Updating Records in a Database
Deleting Selected Records from a Database
Deleting All Records in a Database Table
Masking Passwords
Masking Passwords by Using Internet Explorer
Sending E-Mail
Sending E-Mail from a Script
Sending E-Mail Without Installing the SMTP Service
Tracking Script Progress
Tracking Script Progress by Using Internet Explorer
Tracking Dynamic Script Progress by Using Internet Explorer
Tracking Script Progress in a Command Window
Managing Scheduled Tasks
Enumerating Scheduled Tasks
Creating Scheduled Tasks
Deleting Scheduled Tasks
Scripting Guidelines
Overview of Scripting Guidelines
Using Naming Conventions
Naming Scripts
Naming Variables
Naming Constants
Naming Functions and Procedures
Constructing Scripts
Choosing a Script Construction
Creating a Script Template
Using Functions and Procedures
Formatting Code
Using White Space
Setting Statement Breaks
Creating Scripts That Are Easier to Read
Commenting Scripts
Adding Comments to a Script
Formatting Comments
Creating Script Headers
Creating Function and Procedure Headers
Creating Script Documentation by Using Comments
Using Comments as a Debugging Aid
Debugging and Troubleshooting Scripts
Adding a Trace Routine to a Script
Incrementally Running a Script
Turning Off Error Handling as a Debugging Tool
Testing Scripts
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635
BUY ON AMAZON
Qshell for iSeries
The Integrated File System
Command-Line Arguments
Path-Name Expansion
Application Development Tools
Java Development Tools
SQL Hacks
Hack 9. Filter on Indexed Columns
Hack 13. Choose the Right Join Style for Your Relationships
Hack 51. Display Rows As Columns
Hack 61. Set Security Based on Rows
Hack 80. Play Six Degrees of Kevin Bacon
Excel Scientific and Engineering Cookbook (Cookbooks (OReilly))
Introduction
Setting Cell Data Types
Using Conditional Statements
Saving Custom Chart Types
Plotting Time Series Data
Service-Oriented Architecture (SOA): Concepts, Technology, and Design
Why this book is important
Policies
Service layer abstraction
Business service layer
Service layer configuration scenarios
File System Forensic Analysis
Hard Disk Data Acquisition
GPT Partitions
File System Category
Inodes
Metadata Category
Programming .Net Windows Applications
Overview
Publish and Subscribe
CommonDialog Classes
Labels and Buttons
Containers
flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net
Privacy policy
This website uses cookies. Click
here
to find out more.
Accept cookies