xxvi
Contents
Get-Ipconfi g ............................................................................................................697
Ping ........................................................................................................................ 703
Clever Uses for Hash Tables .............................................................................................704
COM Objects: A Firewall Tool .......................................................................................... 705
Using .NET Objects to Access Mail and Web Services ..................................................... 711
Sending mail ........................................................................................................... 711
Using the Web client object and XML .................................................................... 714
Regular Expressions ........................................................................................................ 718
More Advanced Text Processing — Discovering Script Dependencies ............................723
Scripts or Fuctions: Checking How a Script was Invoked ................................................ 727
Summary ..........................................................................................................................728
Part VI: Appendixes
Windows Scripting API
Appendix A:
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
XML Elements ..................................................................................................................733
................................................................................................................733
..............................................................................................................733
...............................................................................................................734
......................................................................................................................734
getResource Static Method ............................................................................................... 735
Usage: VBScript ...................................................................................................... 735
Usage: JScript .......................................................................................................... 735
Drives Collection .............................................................................................................. 735
Creating: VBScript .................................................................................................. 735
Creating: JScript .....................................................................................................736
Properties ...............................................................................................................736
Printers Collection ............................................................................................................736
Creating: VBScript ..................................................................................................736
Creating: JScript .....................................................................................................736
Properties ...............................................................................................................736
StdIn Stream* ...................................................................................................................736
Creating ..................................................................................................................736
Methods ..................................................................................................................736
Properties ............................................................................................................... 737
StdErr Stream* ................................................................................................................. 737
Creating .................................................................................................................. 737
Methods .................................................................................................................. 737
StdOut Stream* ................................................................................................................ 737
Creating .................................................................................................................. 737
Methods .................................................................................................................. 737
WshArguments Collection ...............................................................................................738
Creating ..................................................................................................................738
Methods ..................................................................................................................738
Properties ...............................................................................................................738
86804ftoc.indd xxvi
86804ftoc.indd xxvi
1/22/09 11:53:41 AM
1/22/09 11:53:41 AM
xxvii
Contents
WshNamed Collection ......................................................................................................738
Creating ..................................................................................................................738
Method ...................................................................................................................738
Properties ...............................................................................................................738
WshUnnamed Collection..................................................................................................738
Creating ..................................................................................................................738
Method ...................................................................................................................739
Properties ...............................................................................................................739
Script.Signer Object..........................................................................................................739
Creating ..................................................................................................................739
Method ...................................................................................................................739
WScript Object .................................................................................................................739
Creating ..................................................................................................................739
Methods ..................................................................................................................739
Properties ............................................................................................................... 740
WshController Object ....................................................................................................... 740
Creating .................................................................................................................. 740
Method ................................................................................................................... 740
WshEnvironment Object .................................................................................................. 740
Creating: VBScript .................................................................................................. 740
Creating: JScript ..................................................................................................... 740
Methods .................................................................................................................. 740
Properties ............................................................................................................... 741
WshNetwork Object ......................................................................................................... 741
Creating .................................................................................................................. 741
Methods .................................................................................................................. 741
Properties ............................................................................................................... 741
WshRemote Object ........................................................................................................... 742
Creating: VBScript .................................................................................................. 742
Creating: JScript ..................................................................................................... 742
Methods .................................................................................................................. 742
Properties ............................................................................................................... 742
Events ..................................................................................................................... 742
WshRemoteError Object ................................................................................................... 742
Properties ............................................................................................................... 742
WshScriptExec Object ...................................................................................................... 743
Creating: VBScript .................................................................................................. 743
Creating: JScript ..................................................................................................... 743
Methods .................................................................................................................. 743
Properties ............................................................................................................... 743
WshShell Object ............................................................................................................... 743
Creating .................................................................................................................. 743
Methods .................................................................................................................. 743
Properties ...............................................................................................................744
86804ftoc.indd
xxvii
86804ftoc.indd xxvii
1/22/09 11:53:41 AM
1/22/09 11:53:41 AM