Àâòîðèçàöèÿ
Ïîèñê ïî óêàçàòåëÿì
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
Ïðåäìåòíûé óêàçàòåëü
Functions, Log( ) 119
Functions, lsArray( ) 152
Functions, lsMember( ) 46
Functions, lsMemberOf( ) 43—44 46 67 69
Functions, LTrim( ) 131
Functions, main script, custom functions 45—46
Functions, main script, intrinsic functions 47—48
Functions, MakePW 117
Functions, Mid( ) 44 63 67 118 131 143
Functions, Minute( ) 146
Functions, modular 43
Functions, Month( ) 146
Functions, MonthName( ) 147
Functions, MsgBox( ) 94 101—110 114 491
Functions, NameCase( ) 140
functions, now( ) 146
Functions, On Error Goto 0 70
Functions, output values 87—88
Functions, output, defining 223
Functions, Randomize 119
functions, replace( ) 131 140—141 143
Functions, Right( ) 131 134 143
Functions, Rnd( ) 119 126
functions, round( ) 509
Functions, RTrim( ) 131
Functions, Second( ) 146
Functions, Sin( ) 119
Functions, Space( ) 131
Functions, Split( ) 150
Functions, Sqr( ) 119
Functions, StrComp( ) 131
Functions, string manipulation 130—131
Functions, StrReverse( ) 131
Functions, Tan( ) 119
Functions, Time( ) 146
Functions, Trim( ) 131
Functions, UCase( ) 131 136 139—140
Functions, Unescape( ) 131
Functions, Weekday( ) 146
Functions, WeekdayName( ) 147
Functions, when to use 45
functions, writing 223—227 340 342
Functions, Year( ) 146
Future dates, working with 147—148
GC (Global Catalog) provider, ADSI 254
get method 263
Get method (objDomain) 248
Get method, user information, querying 273—274
get( ) method 87
GetEx method 263
GetFolder method (FSO) 197
GetInfo method 263
GetInfo.vbs listing (6.1) 111—114
GetIP( ) function 44 67—68
GetMail( ) method 96
GetObject statement 248
GetOSInfo( ) function 340—351
GetOSInfo.vbs listing (20.2) 340—342
GetParentFolderName method (FSO) 197
GetSpecialFolder method (FSO) 197
GetSPVer( ) function 418
GetTempName method, FSO (FileSystemObject) 210
Go subroutine 418
graphical applications 410
Graphical input, message boxes, asking for 108—109
graphical user interfaces (GUIs) see “GUIs (Graphical User Interfaces)”
Group Policy object (GPO) Editor 406
groups 271
groups, creating 271
Groups, creating, LDAP provider 273
Groups, creating, WinNT provider 272
Groups, membership, checking 61 275—277
GUIs (graphical user interfaces) 409
GUIs (graphical user interfaces), HTA (HTML Applications), designing 412—413
hash rules 400
Hicks, Jeffrey 409
Hierarchies, WMI (Windows Management Instrumentation) 283—285
Hierarchies, WMI (Windows Management Instrumentation), consumers 285—286
Hierarchies, WMI (Windows Management Instrumentation), providers 285—286
Hierarchies, WMI (Windows Management Instrumentation), versions 286
Hosts, script hosts 14—16
Hot fixes, listing 492—495
HotKey method (Shortcut object) 187
Hour( ) function 146
HTAs (HTML Applications) 23 409—410 420
HTAs (HTML Applications), building 410
HTAs (HTML Applications), event handlers 410
HTAs (HTML Applications), event handlers, wiring up 418—420
HTAs (HTML Applications), event-driven scripting 410
HTAs (HTML Applications), functional code, writing 411—412
HTAs (HTML Applications), HTML code, converting 414—416
HTAs (HTML Applications), Mshta.exe 411
HTAs (HTML Applications), scheduled tasks 410
HTAs (HTML Applications), script code, adding 416 418
HTAs (HTML Applications), security context 409
HTAs (HTML Applications), user interface, designing 412—413
HTAs (HTML Applications), writing 411—416 418—420
HTML (Hypertext Markup Language) 23
HTML Applications (HTAs) see “HTAs (HTML Applications)”
HTML code, HTAs (HTML Applications), converting 414—416
Hungarian notation 85
IconLocation method (Shortcut object) 187
Icons, critical icon 107
Icons, exclamation mark icon 106
Icons, message boxes 103
Icons, question mark icon 106
Identifying possible errors listing (4.6) 71
IDEs (integrated development environments) 29 44
If/Then conditional execution statements 156—161
If/Then conditional execution statements, nesting 159—160
If/Then constructs 69
Ignore button 107
IIS (Internet Information Services) 219
IIS log rotation tool, creating 219
IIS log rotation tool, creating, candidate modules, identifying 223
IIS log rotation tool, creating, FormatLogFileName function, writing 223—227
IIS log rotation tool, creating, functions, writing 223—227
IIS log rotation tool, creating, main script, writing 228—234
IIS log rotation tool, creating, script design 219—222
IIS log rotation tool, creating, script, testing 234—243
IIS log rotation tool, creating, subroutines, writing 223—227
IIS provider, ADSI 254
Inline code 45
Input parameters, functions 85—89
Input, command-line parameters 110—114
Input, functions, defining 223
Input, message boxes, asking for 108—110
InputBox( ) function 108—110 216
Installation, Script Encoder 390
Installation, WMI (Winodws Management Instrumentation) 290—291
Instances, WMI instances, associating 321—325
Instr( ) function 44 63 67 86 143 213
InStrRev( ) function 131
Int( ) function 126
Integers 115
Integrated Development Environments (IDEs) see “IDEs (Integrated Development Environments)”
Interaction, objects 75
Interfaces 193
Internet Information Services (IIS) 219
Internet shortcuts, creating 188
Internet zone rules 401
Interpretation, scripting 17
Interpreted languages, VBScript 14
Interrelated classes, WMI (Windows Management Instrumentation) 300 317—320
Interrelated classes, WQL (WMI Query Language) 317
Intrinsic functions 42
Intrinsic functions, custom functions, compared 48 88—92
Intrinsic functions, main script 47—48
Intrinsic subroutines 44
Intrinsic subroutines, main script 47—48
Inventories, domains, script for 343—344 347—352 355
Inventory.vbs listing (29.6) 494—495
InventoryDomain.vbs listing (20.4) 344—350
InventoryDomain2.vbs listing (20.5) 352—355
IP addresses, local IP addresses, attaining 61—63
IP addresses, third octet, attaining 63
Ipconfig command-line utility 110
IsArray( ) function 152
IsMember( ) function 46
IsMemberOf( ) function 43—46 67 69
IsReady property (Drive object) 195
Java Virtual Machines (JVMs) 17
JavaScript 382
Join( ) function 151
Jscript 382
JVMs (Java Virtual Machines) 17
keywords 422
Keywords, Dim 89 149
keywords, function 48
Keywords, Preserve 150
keywords, sub 48
Keywords, where 136
Keywords, WQL (WMI Query Language) 303
KiXtart 439
Languages, strongly typed languages 82
Languages, weakly typed languages 82
LCase( ) function 131 217
LDAP (Lightweight Directory Access Protocol) 252
LDAP (Lightweight Directory Access Protocol), directories, fully qualified domain names 253
LDAP (Lightweight Directory Access Protocol), paths 252
LDAP provider 271
LDAP provider, ADSI, connections 248
LDAP provider, domain attributes 258
LDAP provider, domains, querying 257—259
LDAP provider, group membership, checking 275—277
LDAP provider, groups, creating 273
LDAP provider, user settings, changing 274—275
LDAP provider, users, creating 273
LDAP provider, users, information queries 273—274
Left( ) function 131—133
Len command 225
Len( ) function 131
Libraries, object libraries, FSO (FileSystemObject) 193—194
Libraries, script libraries, creating 72
Lightweight directory access protocol (LDAP) see “LDAP (Lightweight Directory Access Protocol)”
Line continuation characters 34 79
Line continuation characters (_) 337
Listing, hot fixes 492 494—495
Listing, remote shares, ADSI 484—486
Listing, software 492—495
listings 9
Listings, 10.1 (ElseIf.vbs) 160—161
Listings, 10.2 (SelectCase.vbs) 161
Listings, 10.3 (WhoHasFile.vbs) 167—170
Listings, 11.1 (Logon.vbs) 178—179
Listings, 11.2 (Shortcuts.vbs) 188—189
Listings, 12.1 (NameDrives.vbs) 196
Listings, 12.2 (Types.vbs) 199
Listings, 12.3 (CheckFolder.vbs) 200—201
Listings, 12.4 (FileProperties.vbs) 204
Listings, 13.1 (FormatLogFileName Function) 225—227
Listings, 13.2 (Log Rotation.vbs) 228—231
Listings, 13.3 (LogRotation2.vbs) 232—234
Listings, 13.4 (LogRotation3.vbs) 234—236
Listings, 13.5 (LogRotation4.vbs) 237—239
Listings, 13.6 (LogRotation5.vbs) 241—243
Listings, 15.1 (PreLoad.vbs) 264—266
Listings, 16.1 (CheckGroupMembership.vbs) 276—277
Listings, 16.2 (PreloadDomain2.vbs) 278—280
Listings, 17.1 (ShowNIC.vbs) 285
Listings, 17.2 (CheckRoutes.vbs) 297
Listings, 19.1 (SetDHCPvbs) 328—330
Listings, 19.2 (CompressAll.vbs) 330—333
Listings, 2.1 (WhoHas.vbs Displays the User or Users Who Have a File Open) 33
Listings, 20.1 (WizardCode.vbs) 337—339
Listings, 20.2 (GetOSInfo.vbs) 340—342
Listings, 20.3 (MainScript.vbs) 343—344
Listings, 20.4 (InventoryDomain.vbs) 344—347
Listings, 20.5 (lnventoryDomain2.vbs) 352—355
Listings, 21.1 (ShowProperties.vbs) 366—368
Listings, 21.2 (ADSIDebug.vbs) 368—369
Listings, 22.1 (WMIFunctions.wsc) 379—382
Listings, 23.1 (ResetPW.vbs. An unencoded administrative script written in VBScript) 391—393
Listings, 24.1 (Signer.wsf. This script signs another one) 402—404
Listings, 25.1 (SampleHTA.hta) 419—420
Listings, 27.1 (Logonl.vbs) 440—444
Listings, 27.2 (Logon2.vbs) 444—445
Listings, 27.3 (ADLogonl.vbs) 446—448
Listings, 27.4 (ADLogon2.vbs) 448—451
Listings, 27.5 (Logoff.vbs) 451—453
Listings, 28.1 (AddUsers.vbs) 456—459
Listings, 28.2 (FindOldUsers.vbs) 464—466
Listings, 28.3 (CollectSyslnfo.vbs) 469—471
Listings, 28.4 (TargetingLists.vbs) 474—475
Listings, 28.5 (TargetingAD.vbs) 477—479
Listings, 29.1 (Shutdown.vbs) 482—483
Listings, 29.2 (Shares.vbs) 484—485
Listings, 29.3 (ListShares.vbs) 485—486
Listings, 29.4 (WhoHas.vbs) 486—488
Listings, 29.5 (Uninstall.vbs) 489—492
Listings, 29.6 (Inventory.vbs) 494—495
Listings, 3.1 (LoginScript.vbs Sample Logon Script) 40
Listings, 3.2 (AddUsersFromXLS.vbs. Creates users from an Excel spreadsheet) 49—50
Listings, 3.3 (AddUsersFromXLS.vbs. Creates users from an Excel spreadsheet) 50—53
Listings, 30.1 (MassPass.vbs) 503—505
Listings, 30.2 (UpdateServices.vbs) 505—508
Listings, 4.1 (Logon script task list) 56
Listings, 4.2 (Logon script task list v2) 56
Listings, 4.3 (Logon script task list v3) 57
Listings, 4.4 (Retrieve IP Address.vbs) 62
Listings, 4.5 (LogonScript.vbs) 64—69
Listings, 4.6 (Identifying possible errors) 71
Listings, 5.1 (DisableUser.vbs) 77—79
Listings, 5.2 (DisableUser2.vbs) 90—92
Listings, 5.3 (ErrorMsg Subroutine) 93
Listings, 5.4 (TreeObject model script) 97
Listings, 5.5 (RootFiles) 98—99
Listings, 6.1 (Getlnfo.vbs) 111—114
Listings, 7.1 (MakePW.vbs) 117—118
Listings, 7.2 (MakePW.vbs) 120—121
ListShares.vbs listing (29.3) 485—486
Live Syntax Checking 422
Loading domains, preloading 264—269
Local IP addresses, attaining 61—63
Local name parameter (MapNetworkDrive method) 175
Lockout policies, domains, changing 259
LockoutDuration domain attribute (LDAP provider) 258
LockOutObservationWindow domain attribute (LDAP provider) 258
LockoutThreshold domain attribute (LDAP provider) 258
log file scanners, creating, FSO (FileSystemObject) 211—218
LOG function 468
Log rotation tool, creating 219
Log rotation tool, creating, candidate modules, identifying 223
Log rotation tool, creating, FormatLogFileName function, writing 223—227
Log rotation tool, creating, functions, writing 223—227
Log rotation tool, creating, main script, writing 228—234
Log rotation tool, creating, script design 219—222
Log rotation tool, creating, script, testing 234—236 239—243
Log rotation tool, creating, subroutines, writing 223—227
Log Rotation.vbs listing (13.2) 228—231
Log( ) function 119
LogEvent method (Shell object) 184
logic errors 70 219
LoginScript.vbs sample logon script 39 42
LoginScript.vbs Sample Logon Script listing (3.1) 40
logoff scripts 439
Logoff scripts, AD (Active Directory) 451—453
Logoff.vbs listing (27.5) 451—453
Logon script task list listing (4.1) 56
Logon script task list v2 listing (4.2) 56
Ðåêëàìà