Àâòîðèçàöèÿ
Ïîèñê ïî óêàçàòåëÿì
Jones D. — VBScript, WMI, and ADSI Unleashed
Îáñóäèòå êíèãó íà íàó÷íîì ôîðóìå
Íàøëè îïå÷àòêó? Âûäåëèòå åå ìûøêîé è íàæìèòå Ctrl+Enter
Íàçâàíèå: VBScript, WMI, and ADSI Unleashed
Àâòîð: Jones D.
Àííîòàöèÿ: If you’re a Windows administrator, scripting expertise can liberate you from boring, repetitive work–so you can take on the sophisticated, high-value projects you really want. Top scripting guru Don Jones has written the definitive administrator’s guide to getting results with Microsoft’s key scripting technologies: VBScript, WMI, and ADSI.
Jones draws on his unsurpassed experience training Windows administrators in conferences, classes, and from his enormously popular site, ScriptingAnswers.com.
You’ll learn how to use VBScript, WMI, and ADSI to gain administrative control over nearly every aspect of every recent Windows server or client, including Windows Server 2003, Vista, XP, 2000, and NT. As you gain experience, Jones introduces more advanced techniques, ranging from modular scripting and script encryption to integrating VBScript with HTML code.
Jones concludes with a full section of ready-to-run, real-world examples–from logon/logoff scripts to automated domain and network administration, from querying WMI to creating Active Directory groups. Every script is explained line-by-line, with challenging techniques described in even greater detail.
ßçûê:
Ðóáðèêà: Òåõíîëîãèÿ /
Ñòàòóñ ïðåäìåòíîãî óêàçàòåëÿ: Ãîòîâ óêàçàòåëü ñ íîìåðàìè ñòðàíèö
ed2k: ed2k stats
Ãîä èçäàíèÿ: 2007
Êîëè÷åñòâî ñòðàíèö: 505
Äîáàâëåíà â êàòàëîã: 30.12.2007
Îïåðàöèè: Ïîëîæèòü íà ïîëêó |
Ñêîïèðîâàòü ññûëêó äëÿ ôîðóìà | Ñêîïèðîâàòü ID
Ïðåäìåòíûé óêàçàòåëü
Logon script task list v3 listing (4.3) 57
logon scripts 439
Logon scripts, AD scripts 440—446 453—454
Logon scripts, AD scripts, specific logon scripts 446—451
Logon scripts, NT domains, calling 446
Logon scripts, NT scripts 440—446 453—454
Logon.vbs listing (11.1) 178—179
Logon1.vbs listing (27.1) 440—444
Logon2.vbs listing (27.2) 444—445
LogonScript.vbs listing (4.5) 64—69
LogRotation2.vbs listing (13.3) 232—234
LogRotation3.vbs listing (13.4) 234—236
LogRotation4.vbs listing (13.5) 237—239
LogRotation5.vbs listing (13.6) 241—243
long integers 115
Loops 162—167
Loops, Do Until/Loop construct 163—164
Loops, Do While/Loop construct 162—163
Loops, Do/Loop Until construct 163—164
Loops, Do/Loop While construct 162—163
loops, exiting 166—167
Loops, For Each/Next construct 165—166
Loops, For/Next construct 164—165
LTrim( ) function 131
Main script 44—45
Main script, custom functions and subroutines 45—46
Main script, decision making in 48
Main script, intrinsic functions 47—48
Main script, statements 47—48
Main script, testing 234—243
Main script, writing 228—350
Main scripts, errors, identifying 231—233
MainScript.vbs listing (20.3) 343—344
MakePW function 117
MakePW.vbs listing (7.1) 117—118
MakePW.vbs listing (7.2) 120—121
Managing Windows with VBScript and WMI 2
MapDrive routine 68
MapDrive subroutine 44 67
MapNetworkDrive method (Network object) 175—176
Mapping, drives 60—61
Mapping, printers 61
MapPrinter command 67
Mass password changes, ADSI, performing 503—505
MassPass.vbs listing (30.1) 503—505
mathematical operators 116—118
Mathematical operators, Boolean operators 121 156—157
MaxPwdAge domain attribute (LDAP provider) 258
Melissa virus 399
Membership, groups, checking 61 275—277
message boxes 101
Message boxes, buttons 103
Message boxes, command-line input, asking for 109—110
Message boxes, defaults 103
Message boxes, graphical input, asking for 108—109
Message boxes, icons 103
Message boxes, input, asking for 108—110
Message boxes, modality 103
Message boxes, system icons 102
Messages, displaying 59—60 101—108
Messages, displaying, complex messages 105—106
Messages, displaying, WScript.Echo 107—108
Messages, nonerror messages 106
Messages, nonwarning messages 106
Methods, COM objects 95—96
methods, Create 260
Methods, Create method 261
Methods, CreateShortcut 187
Methods, CreateTextFile 347
Methods, Delete 263
Methods, DeleteMail 96
Methods, ExecQuery( ) 285 422
methods, execute( ) 423
Methods, FileSystemObject’s GetFolder 99
Methods, FSO (FileSystemObject), CopyFolder 197
Methods, FSO (FileSystemObject), CreateFolder 197
Methods, FSO (FileSystemObject), DeleteFolder 197
Methods, FSO (FileSystemObject), File objects 204—206
Methods, FSO (FileSystemObject), Folder objects 198
Methods, FSO (FileSystemObject), FolderExists 197
Methods, FSO (FileSystemObject), folders 197
Methods, FSO (FileSystemObject), GetFolder 197
Methods, FSO (FileSystemObject), GetParentFolderName 197
Methods, FSO (FileSystemObject), GetSpecialFolder 197
Methods, FSO (FileSystemObject), MoveFolder 197
methods, GET 263 273—274
methods, get( ) 87
methods, GetEx 263
Methods, Getlnfo 263
Methods, GetMail( ) 96
Methods, Network object, AddPrinterConnection 177
Methods, Network object, AddWindowsPrinterConnection 177
Methods, Network object, ComputerName 178
Methods, Network object, EnumNetworkDrive 176
Methods, Network object, EnumPrinterConnection 177
Methods, Network object, MapNetworkDrive 175—176
Methods, Network object, RemoveNetworkDrive 176
Methods, Network object, RemovePrinterConnection 178
Methods, Network object, SetDefaultPrinter 178
Methods, Network object, UserDomain 178
Methods, Network object, UserName 178
Methods, objDomain variable 248
Methods, OpenTextFile 468
methods, Put 263 274—275
methods, PutEx 275
Methods, Setlnfo 260—263
Methods, Shell object, AppActivate method 185
Methods, Shell object, CreateShortcut method 183
Methods, Shell object, Environment method 183—184
Methods, Shell object, Exec method 180—182
Methods, Shell object, ExpandEnvironmentStrings method 184
Methods, Shell object, LogEvent method 184
Methods, Shell object, Popup method 187
Methods, Shell object, RegDelete method 184—185
Methods, Shell object, RegRead method 184
Methods, Shell object, RegWrite method 184—185
Methods, Shell object, Run method 180—182
Methods, Shell object, SendKeys method 185—187
Methods, Shell object, SpecialFolders method 182—183
Methods, Shortcut object 187—188
Methods, Shutdown 308 311 483
Methods, Uninstall 492
Microsoft Expression 410
Microsoft FrontPage 410
Microsoft Technet 2
Microsoft’s MSDN Library 420
Mid( ) function 44 63 67
Minimum requirements, computers 8
MinPwdAge domain attribute (LDAP provider) 258
MinPwdLength domain attribute (LDAP provider) 258
Minute( ) function 146
Modality, message boxes 103
Modifying scripts 240—241
Modular functions 43
Modularization, scripts 373—377 388
Modularization, scripts, detriments 377
Modularization, scripts, reasons for 377
Modularization, scripts, WSCs (Windows Script Components) 378
Modularization, scripts, WSCs (Windows Script Components), XML (Extensible Markup Language) 378—384 387
modules, creating 63—69
Modules, searching for 373—377
Monospaced type 8
Month( ) function 146
MonthName( ) function 147
Move method (Folder objects) 198
Move method (FSO File objects) 204
MoveFolder method (FSO) 197
MSDN Library (Microsoft) 420
MsgBox statement 24—25 84 94 101—108 114 170
MsgBox statement, best practices 106—107
MsgBox statement, display options 103
MsgBox statement, message boxes, displaying 101—108
MsgBox statement, return values 104
MsgBox( ) function 94 491
MsgBox( ) function, input asking for 108—110
MsgBox( ) function, messages, displaying 101—108
Mshta.exe, HTAs (HTML Applications) 411
MSI packages, remote MSI packages, uninstalling 489—492
multidimensional arrays 149
Name property (FSO File object) 204
NameCase( ) function 140
NameDrives.vbs listing (12.1) 196
names, variables 227
Native scripts 17
NDS (NetWare Directory Services) provider, ADSI 254
Nesting If/Then constructs 159—160
NET command 60
net time command 445
Network administrative scripts 481 495
Network administrative scripts, hot fixes, listing 492—495
Network administrative scripts, open files, monitoring 486—488
Network administrative scripts, remote computers, shutting down 481 483
Network administrative scripts, remote MSI packages, uninstalling 489—492
Network administrative scripts, remote shares, listing 484—486
Network administrative scripts, software, listing 492—495
Network drive type 196
Network object (WSH) 173—175
Network object (WSH), AddPrinterConnection method 177
Network object (WSH), AddWindowsPrinterConnection method 177
Network object (WSH), ComputerName method 178
Network object (WSH), EnumNetworkDrive method 176
Network object (WSH), EnumPrinterConnection method 177
Network object (WSH), MapNetworkDrive method 175—176
Network object (WSH), practical application 178—179
Network object (WSH), RemoveNetworkDrive method 176
Network object (WSH), RemovePrinterConnection method 178
Network object (WSH), SetDefaultPrinter method 178
Network object (WSH), UserDomain method 178
Network object (WSH), UserName method 178
NIMDA virus 399
Nonerror messages 106
Nonwarning messages 106
Notations, Hungarian notation 85
Notepad 219
Notepad, scripting with 25—26
Nothing statement 251
Now( ) functions 146
NT domains, VBScript logon scripts, calling 446
NT scripts, logon scripts 440—446 453—454
Numbers, currency number types 116
Numbers, doubles 115
Numbers, fractional values 115
Numbers, integers 115
Numbers, singles 115
Numbers, VBScript 115—116
Numbers, whole numbers 115
numeric data types, converting 126—127
Numeric variables, arrays 151—152
NWCOMPAT provider, ADSI 254
ObjDomain variable 248
Object Browser (WMI) 291—292
Object creation scripts, ADSI object creation script 500—502
Object deletion scripts, ADSI object creation script 502—503
Object interfaces 76
Object libraries, FSO (FileSystemObject) 193—194
Object query scripts, ADSI object creation script 502
Object-oriented programming language 75
Objects 99 189—190
Objects, ADSI (Active Directory Services Interface) 247—249
Objects, ADSystem object 179—180
Objects, COM objects 94—98
Objects, COM objects, collections 96
Objects, COM objects, methods 95—96
Objects, COM objects, properties 95
Objects, COM objects, sample object (Tree object) 97—98
Objects, COM objects, scripting with 98—99
Objects, FSO (FileSystemObject) 209 218
Objects, FSO (FileSystemObject), Drive object 194—197
Objects, FSO (FileSystemObject), File object 194
Objects, FSO (FileSystemObject), File objects 203—206
Objects, FSO (FileSystemObject), Folder object 194
Objects, FSO (FileSystemObject), Folder objects 197—203
Objects, FSO (FileSystemObject), TaxStream object 194
Objects, FSO (FileSystemObject), TextStream objects 206—209 212 216
Objects, fully qualified domain names, LDAP directories 253
Objects, interaction 75
Objects, names 194
Objects, Network object 173—175
Objects, Network object, AddPrinterConnection method 177
Objects, Network object, AddWindowsPrinterConnection method 177
Objects, Network object, ComputerName method 178
Objects, Network object, EnumNetworkDrive method 176
Objects, Network object, EnumPrinterConnection method 177
Objects, Network object, MapNetworkDrive method 175—176
Objects, Network object, practical application 178—179
Objects, Network object, RemoveNetworkDrive method 176
Objects, Network object, RemovePrinterConnection method 178
Objects, Network object, SetDefaultPrinter method 178
Objects, Network object, UserDomain method 178
Objects, Network object, UserName method 178
Objects, Shell object 173 180
Objects, Shell object, AppActivate method 185
Objects, Shell object, CreateShortcut method 183
Objects, Shell object, Environment method 183—184
Objects, Shell object, Exec method 180—182
Objects, Shell object, ExpandEnvironmentStrings method 184
Objects, Shell object, LogEvent method 184
Objects, Shell object, Popup method 187
Objects, Shell object, RegDelete method 184—185
Objects, Shell object, RegRead method 184
Objects, Shell object, RegWrite method 184
Objects, Shell object, Run method 180
Objects, Shell object, SendKeys method 185—187
Objects, Shell object, SpecialFolders method 182—183
Objects, Shortcut object 173 187
Objects, Shortcut object, methods 187
Objects, Shortcut object, practical application 188—189
Objects, Shortcut object, properties 187
Objects, TextStream 347
Objects, WScript 247
Objects, WScript object 173—174
ObjTS variable 424
OLE DB provider, ADSI 254
On Error Goto 0 function 70
onClick event 418
Oops resilience 32
Open files, monitoring, WinNT provider 486—488
OpenAsTextStream method (FSO File objects) 204
OpenTextFile method 468
Operators 116—118
Operators, Boolean operators 121 156—157
Operators, WQL (WMI Query Language), Boolean operator 301—302
Operators, WQL (WMI Query Language), comparison operator 302—303
Option Explicit command 81
Option Explicit, syntax errors, preventing 423—424
or Boolean operator 156
organizational units (OUs) see “OUs (organizational units)”
OUs (organizational units) 248 257 260 271
OUs (organizational units), creating 260—261
OUs (organizational units), deleting 263—264
OUs (organizational units), modifying 261—263
OUs (organizational units), querying 263
oUser input parameter 89
Outlining scripts 222
Output values, functions 87—88
Output, functions, defining 223
Packaging script 394—397
Parameters, command-line parameters as input 110—114
Parameters, command-line scripts, parsing 111—114
Parameters, input parameters, functions 85—87
Ðåêëàìà