Windows PowerShell cookbook: [the complete guide to Microsoft's new command shell and scripting language]
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Beijing [u.a.]
O'Reilly
2008
|
Ausgabe: | 1. ed. |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXVII, 553 S. 24 cm |
ISBN: | 0596528493 9780596528492 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV023354188 | ||
003 | DE-604 | ||
005 | 20090116 | ||
007 | t | ||
008 | 080619s2008 |||| 00||| eng d | ||
015 | |a 07N320025 |2 dnb | ||
016 | 7 | |a 984964894 |2 DE-101 | |
020 | |a 0596528493 |c : 49.99, EUR 48.00 (freier Pr.) |9 0-596-52849-3 | ||
020 | |a 9780596528492 |c : 49.99, EUR 48.00 (freier Pr.) |9 978-0-596-52849-2 | ||
035 | |a (OCoLC)255544656 | ||
035 | |a (DE-599)DNB984964894 | ||
040 | |a DE-604 |b ger |e rakddb | ||
041 | 0 | |a eng | |
049 | |a DE-1051 |a DE-92 | ||
082 | 0 | |a 004 | |
084 | |a ST 261 |0 (DE-625)143633: |2 rvk | ||
084 | |a 004 |2 sdnb | ||
100 | 1 | |a Holmes, Lee |e Verfasser |4 aut | |
245 | 1 | 0 | |a Windows PowerShell cookbook |b [the complete guide to Microsoft's new command shell and scripting language] |c Lee Holmes |
250 | |a 1. ed. | ||
264 | 1 | |a Beijing [u.a.] |b O'Reilly |c 2008 | |
300 | |a XXVII, 553 S. |c 24 cm | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
650 | 0 | 7 | |a Windows PowerShell 3.0 |0 (DE-588)1031799583 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Windows PowerShell |0 (DE-588)7563304-8 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Windows PowerShell |0 (DE-588)7563304-8 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Windows PowerShell 3.0 |0 (DE-588)1031799583 |D s |
689 | 1 | |8 1\p |5 DE-604 | |
856 | 4 | 2 | |m HEBIS Datenaustausch Darmstadt |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016537758&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-016537758 | ||
883 | 1 | |8 1\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk |
Datensatz im Suchindex
_version_ | 1804137713486528512 |
---|---|
adam_text | WINDOWS POWERSHELL COOKBOOK LEE HOLMES O REILLY BEIJING * CAMBRIDGE *
FARNHAM * KOLN * PARIS * SEBASTOPOL * TAIPEI * TOKYO TABLE OF CONTENTS
FOREWORD XVII PREFACE XXI PART I. TOUR A GUIDED TOUR OF WINDOWS
POWERSHELL 3 INTRODUCTION 3 AN INTERACTIVE SHELL 4 STRUCTURED COMMANDS
(CMDLETS) 6 DEEP INTEGRATION OF OBJECTS 7 ADMINISTRATORS AS
FIRST-CLASS USERS 8 COMPOSABLE COMMANDS . 9 TECHNIQUES TO PROTECT YOU
FROM YOURSELF 9 COMMON DISCOVERY COMMANDS 10 UBIQUITOUS SCRIPTING 11
AD HOC DEVELOPMENT 12 BRIDGING TECHNOLOGIES 12 NAMESPACE NAVIGATION
THROUGH PROVIDERS * 14 MUCH, MUCH MORE 9 16 PART II. FUNDAMENTALS 1. THE
WINDOWS POWERSHELL INTERACTIVE SHELL 19 1.0 INTRODUCTION 19 1.1 RUN
PROGRAMS, SCRIPTS, AND EXISTING TOOLS 19 1.2 RUN A POWERSHELL COMMAND 21
1.3 CUSTOMIZE YOUR SHELL, PROFILE, AND PROMPT 22 1.4 FIND A COMMAND TO
ACCOMPLISH A TASK 25 1.5 GET HELP ON A COMMAND 26 1.6 PROGRAM: SEARCH
HELP FOR TEXT 28 1.7 INVOKE A POWERSHELL SCRIPT FROM OUTSIDE POWERSHELL
29 1.8 PROGRAM: RETAIN CHANGES TO ENVIRONMENT VARIABLES SET BY A BATCH
FILE30 1.9 GET THE SYSTEM DATE AND TIME 32 1.10 DETERMINE THE STATUS OF
THE LAST COMMAND 33 1.11 MEASURE THE DURATION OF A COMMAND 34 1.12
CUSTOMIZE THE SHELL TO IMPROVE YOUR PRODUCTIVITY 35 1.13 PROGRAM: LEARN
ALIASES FOR COMMON COMMANDS 36 1.14 ACCESS AND MANAGE YOUR CONSOLE
HISTORY 38 1.15 STORE THE OUTPUT OF A COMMAND INTO A FILE 39 1.16 ADD
INFORMATION TO THE END OF A FILE 41 1.17 RECORD A TRANSCRIPT OF YOUR
SHELL SESSION 41 1.18 DISPLAY THE PROPERTIES OF AN ITEM AS A LIST 42
1.19 DISPLAY THE PROPERTIES OF AN ITEM AS A TABLE 42 1.20 MANAGE THE
ERROR OUTPUT OF COMMANDS 44 1.21 CONFIGURE DEBUG, VERBOSE, AND PROGRESS
OUTPUT 45 1.22 EXTEND YOUR SHELL WITH ADDITIONAL SNAPINS 47 1.23 USE
CONSOLE FILES TO LOAD AND SAVE SETS OF SNAPINS 48 2. PIPELINES *. 49 2.0
INTRODUCTION 49 2.1 FILTER ITEMS IN A LIST OR COMMAND OUTPUT 50 2.2
PROGRAM: SIMPLIFY MOST WHERE-OBJECT FILTERS 51 2.3 PROGRAM:
INTERACTIVELY FILTER LISTS OF OBJECTS 52 2.4 WORK WITH EACH ITEM IN A
LIST OR COMMAND OUTPUT 54 2.5 AUTOMATE DATA-INTENSIVE TASKS . 56 3.
VARIABLES AND OBJECTS 61 3.0 INTRODUCTION 61 3.1 STORE INFORMATION IN
VARIABLES 62 3.2 ACCESS ENVIRONMENT VARIABLES 63 3.3 CONTROL ACCESS AND
SCOPE OF VARIABLES AND OTHER ITEMS 65 3.4 WORK WITH .NET OBJECTS 67 3.5
CREATE AN INSTANCE OF A .NET OBJECT 71 3.6 PROGRAM: CREATE INSTANCES OF
GENERIC OBJECTS 73 3.7 REDUCE TYPING FOR LONG CLASS NAMES 74 TABLE OF
CONTENTS 3.8 USE A COM OBJECT 76 3.9 LEARN ABOUT TYPES AND OBJECTS 77
3.10 GET DETAILED DOCUMENTATION ABOUT TYPES AND OBJECTS 78 3.11 ADD
CUSTOM METHODS AND PROPERTIES TO OBJECTS 80 3.12 ADD CUSTOM METHODS AND
PROPERTIES TO TYPES 82 4. LOOPING AND FLOW CONTROL 87 4.0 INTRODUCTION
87 4.1 MAKE DECISIONS WITH COMPARISON AND LOGICAL OPERATORS 87 4.2
ADJUST SCRIPT FLOW USING CONDITIONAL STATEMENTS 89 4.3 MANAGE LARGE
CONDITIONAL STATEMENTS WITH SWITCHES 90 4.4 REPEAT OPERATIONS WITH LOOPS
91 4.5 ADD A PAUSE OR DELAY 93 5. STRINGS AND UNSTRUCTURED TEXT.. 95 5.0
INTRODUCTION 95 5.1 CREATE A STRING 95 5.2 CREATE A MULTILINE OR
FORMATTED STRING 97 5.3 PLACE SPECIAL CHARACTERS IN A STRING 98 5.4
INSERT DYNAMIC INFORMATION IN A STRING 99 5.5 PREVENT A STRING FROM
INCLUDING DYNAMIC INFORMATION 100 5.6 PLACE FORMATTED INFORMATION IN A
STRING 101 5.7 SEARCH A6TRING FOR TEXT OR A PATTERN 102 5.8 REPLACE TEXT
IN A STRING 105 5.9 CONVERT A STRING TO UPPER/LOWERCASE 106 5.10 TRIM A
STRING , 107 5.11 FORMAT A DATE FOR OUTPUT^ 108 5.12 PROGRAM:
CONVERT TEXT STREAMS TO OBJECTS 110 5.13 GENERATE LARGE REPORTS AND TEXT
STREAMS 114 6. CALCULATIONS AND MATH 117 6.0 INTRODUCTION 117 6.1
PERFORM SIMPLE ARITHMETIC * 117 6.2 PERFORM COMPLEX ARITHMETIC 119 6.3
MEASURE STATISTICAL PROPERTIES OF A LIST 121 6.4 WORK WITH NUMBERS AS
BINARY 123 6.5 SIMPLIFY MATH WITH ADMINISTRATIVE CONSTANTS 127 6.6
CONVERT NUMBERS BETWEEN BASES 128 TABLE OF CONTENTS I VII PART III.
COMMON TASKS 7. SIMPLE FILES 133 7.0 INTRODUCTION 133 7.1 GET THE
CONTENT OF A FILE 133 7.2 SEARCH A FILE FOR TEXT OR A PATTERN 135 7.3
PARSE AND MANAGE TEXT-BASED LOGFILES 136 7.4 PARSE AND MANAGE BINARY
FILES 139 7.5 CREATE A TEMPORARY FILE 141 7.6 SEARCH AND REPLACE TEXT IN
A FILE 143 8. STRUCTURED FILES 147 8.0 INTRODUCTION 147 8.1 ACCESS
INFORMATION IN AN XML FILE 147 8.2 PERFORM AN XPATH QUERY AGAINST AN XML
FILE 150 8.3 MODIFY DATA IN AN XML FILE 151 8.4 EASILY IMPORT AND EXPORT
YOUR STRUCTURED DATA 153 8.5 STORE THE OUTPUT OF A COMMAND IN A CSV FILE
155 8.6 IMPORT STRUCTURED DATA FROM A CSV FILE 156 8.7 USE EXCEL TO
MANAGE COMMAND OUTPUT 157 9. INTERNET-ENABLED SCRJPTS 160 9.0
INTRODUCTION 160 9.1 DOWNLOAD A FILE FROM THE INTERNET 160 9.2 DOWNLOAD
A WEB PA GE FROM THE INTERNET 161 9.3 PROGRAM: GET-PAGEURLS - 163 ; 9.4
PROGRAM: CONNECT-WEBSERVICE . 166 9.5 EXPORT COMMAND OUTPUT AS^A WEB
PAGE 170 9.6 PROGRAM: SEND AN EMAIL 170 9.7 PROGRAM: INTERACT WITH
INTERNET PROTOCOLS 172 10. CODE REUSE R. 176 10.0 INTRODUCTION 176 10.1
WRITE A SCRIPT 176 10.2 WRITE A FUNCTION 179 10.3 WRITE A SCRIPT BLOCK
180 10.4 RETURN DATA FROM A SCRIPT, FUNCTION, OR SCRIPT BLOCK 182 10.5
PLACE COMMON FUNCTIONS IN A LIBRARY 184 10.6 ACCESS ARGUMENTS OF A
SCRIPT, FUNCTION, OR SCRIPT BLOCK 185 VIII I TABLE OF CONTENTS 10.7
ACCESS PIPELINE INPUT 188 10.8 WRITE PIPELINE-ORIENTED SCRIPTS WITH
CMDLET KEYWORDS 189 10.9 WRITE A PIPELINE-ORIENTED FUNCTION 193 11.
LISTS, ARRAYS, AND HASHTABLES 195 11.0 INTRODUCTION 195 11.1 CREATE AN
ARRAY OR LIST OF ITEMS 195 11.2 CREATE A JAGGED OR MULTIDIMENSIONAL
ARRAY , 197 11.3 ACCESS ELEMENTS OF AN ARRAY 198 11.4 VISIT EACH ELEMENT
OF AN ARRAY 199 11.5 SORT AN ARRAY OR LIST OF ITEMS 200 11.6 DETERMINE
WHETHER AN ARRAY CONTAINS AN ITEM 200 11.7 COMBINE TWO ARRAYS 201 11.8
FIND ITEMS IN AN ARRAY THAT MATCH A VALUE 202 11.9 REMOVE ELEMENTS FROM
AN ARRAY 203 11.10 FIND ITEMS IN AN ARRAY GREATER OR LESS THAN A VALUE
204 11.11 USE THE ARRAYLIST CLASS FOR ADVANCED ARRAY TASKS 205 11.12
CREATE A HASHTABLE OR ASSOCIATIVE ARRAY 206 11.13 SORT A HASHTABLE BY
KEY OR VALUE 207 12. USER INTERACTION 209 12.0 INTRODUCTION 209 12.1
READ A LINE OF USER INPUT 209 12.2 READ A KEY OF USER INPUT 210 12.3
PROGRAM: DISPLAY A MENU TO THE USER 211 12.4 DISPLAY MESSAGES AND OUTPUT
TO,THE USER 213 12.5 PROVIDE PROGRESS UPDATES ON LONG-RUNNING TASKS 216
12.6 WRITE CULTURE-AWARE SCRIPTS . 217 12.7 PROGRAM: INVOKE A SCRIPT
BLOCK WITH ALTERNATE CULTURE SETTINGS 220 12.8 ACCESS FEATURES OF THE
HOST S USER INTERFACE 221 12.9 PROGRAM: ADD A GRAPHICAL USER INTERFACE
TO YOUR SCRIPT 223 13. TRACING AND ERROR MANAGEMENT T. 226 13.0
INTRODUCTION 226 13.1 VIEW THE ERRORS GENERATED BY A COMMAND 226 13.2
HANDLE WARNINGS, ERRORS, AND TERMINATING ERRORS 228 13.3 OUTPUT
WARNINGS, ERRORS, AND TERMINATING ERRORS 230 13.4 DEBUG A SCRIPT 231
13.5 COLLECT DETAILED TRACES OF A SCRIPT OR COMMAND 234 13.6 PROGRAM:
ANALYZE A SCRIPT S PERFORMANCE PROFILE 234 TABLE OF CONTENTS | IX 14.
ENVIRONMENTAL AWARENESS 240 14.0 INTRODUCTION * 240 14.1 VIEW AND
MODIFY ENVIRONMENT VARIABLES 240 14.2 ACCESS INFORMATION ABOUT YOUR
COMMAND S INVOCATION 242 14.3 PROGRAM: INVESTIGATE THE INVOCATIONLNFO
VARIABLE 244 14.4 FIND YOUR SCRIPT S NAME 246 14.5 FIND YOUR SCRIPT S
LOCATION 247 14.6 FIND THE LOCATION OF COMMON SYSTEM PATHS 248 14.7
PROGRAM: SEARCH THE WINDOWS START MENU 250 14.8 GET THE CURRENT LOCATION
252 14.9 SAFELY BUILD FILE PATHS OUT OF THEIR COMPONENTS 253 14.10
INTERACT WITH POWERSHELL S GLOBAL ENVIRONMENT 254 15. EXTEND THE REACH
OF WINDOWS POWERSHELL 255 15.0 INTRODUCTION 255 15.1 ACCESS WINDOWS
MANAGEMENT INSTRUMENTATION DATA 255 15.2 PROGRAM: DETERMINE PROPERTIES
AVAILABLE TO WMI FILTERS 257 15.3 PROGRAM: SEARCH FOR WMI CLASSES 258
15.4 USE .NET TO PERFORM ADVANCED WMI TASKS 261 15.5 CONVERT A VBSCRIPT
WMI SCRIPT TO POWERSHELL 263 15.6 AUTOMATE PROGRAMS USING COM SCRIPTING
INTERFACES 266 15.7 PROGRAM: QUERY A SQL DATA SOURCE 267 15.8 ACCESS
WINDOWS PERFORMANCE COUNTERS 270 15.9 PROGRAM: INVOKE NATIVE WINDOWS API
CALLS 271 15.10 PROGRAM: ADD INLINE C# TO YOUR POWERSHELL SCRIPT 273
15.11 ACCESS A .NET SDK LIBRARY / 276 15.12 CREATE YOUR OWN POWERSHELL
CFNDLET 279 15.13 ADD POWERSHELL SCRIPTING TO YOUR OWN PROGRAM 283 16.
SECURITY AND SCRIPT SIGNING 286 16.0 INTRODUCTION 286 16.1 ENABLE
SCRIPTING THROUGH AN EXECUTION POLICY 287 16.2 SIGN A POWERSHELL SCRIPT
OR FORMATTING FILE 289 16.3 PROGRAM: CREATE A SELF-SIGNED CERTIFICATE
291 16.4 MANAGE POWERSHELL SECURITY IN AN ENTERPRISE 292 16.5 VERIFY THE
DIGITAL SIGNATURE OF A POWERSHELL SCRIPT 295 16.6 SECURELY HANDLE
SENSITIVE INFORMATION 296 16.7 SECURELY REQUEST USERNAMES AND PASSWORDS
298 16.8 PROGRAM: START A PROCESS AS ANOTHER USER 300 X | TABLE OF
CONTENTS 16.9 SECURELY STORE CREDENTIALS ON DISK 301 16.10 ACCESS USER
AND MACHINE CERTIFICATES 303 16.11 PROGRAM: SEARCH THE CERTIFICATE STORE
304 PART IV. ADMINISTRATOR TASKS 17. FILESANDDIRECTORIES 309 17.0
INTRODUCTION . 309 17.1 FIND ALL FILES MODIFIED BEFORE A CERTAIN DATE
310 17.2 CLEAR OR REMOVE A FILE 311 17.3 MANAGE AND CHANGE THE
ATTRIBUTES OF A FILE 312 17.4 GET THE FILES IN A DIRECTORY 313 17.5 FIND
FILES THAT MATCH A PATTERN 314 17.6 MANAGE FILES THAT INCLUDE SPECIAL
CHARACTERS 317 17.7 PROGRAM: GET DISK USAGE INFORMATION 318 17.8
DETERMINE THE CURRENT LOCATION 320 17.9 MONITOR A FILE FOR CHANGES 321
17.10 PROGRAM: GET THE MD5 OR SHA1 HASH OF A FILE 321 17.11 CREATE A
DIRECTORY 324 17.12 REMOVE A FILE OR DIRECTORY 324 17.13 RENAME A FILE
OR DIRECTORY 325 17.14 MOVE A FILE OR DIRECTORY 326 17.15 GET THE ACL OF
A FILE OR DIRECTORY . 327 17.16 SET THE ACL OF A FILE OR DIRECTORY 329
17.17 PROGRAM: ADD EXTENDED FILE PROPERTIES TO FILES 330 17.18 PROGRAM:
CREATE A FILESYSTENRHARD LINK 332 17.19 PROGRAM: CREATE A ZIP ARCHIVE
334 18. THE WINDOWS REGISTRY 336 18.0 INTRODUCTION 336 18.1 NAVIGATE THE
REGISTRY 336 18.2 VIEW A REGISTRY KEY 337 18.3 MODIFY OR REMOVE A
REGISTRY KEY VALUE 338 18.4 CREATE A REGISTRY KEY VALUE 339 18.5 REMOVE
A REGISTRY KEY 340 18.6 ADD A SITE TO AN INTERNET EXPLORER SECURITY ZONE
341 18.7 MODIFY INTERNET EXPLORER SETTINGS 343 18.8 PROGRAM: SEARCH THE
WINDOWS REGISTRY 344 TABLE OF CONTENTS | XI 18.9 GET THE ACL OF A
REGISTRY KEY 346 18.10 SET THE ACL OF A REGISTRY KEY 347 18.11 WORK WITH
THE REGISTRY OF A REMOTE COMPUTER 348 18.12 PROGRAM: GET REGISTRY ITEMS
FROM REMOTE MACHINES 349 18.13 PROGRAM: GET PROPERTIES OF REMOTE
REGISTRY KEYS 351 18.14 PROGRAM: SET PROPERTIES OF REMOTE REGISTRY KEYS
353 18.15 DISCOVER REGISTRY SETTINGS FOR PROGRAMS 354 19. COMPARING DATA
358 19.0 INTRODUCTION 358 19.1 COMPARE THE OUTPUT OF TWO COMMANDS 358
19.2 DETERMINE THE DIFFERENCES BETWEEN TWO FILES 359 19.3 VERIFY
INTEGRITY OF FILE SETS 360 20. EVENT LOGS 362 20.0 INTRODUCTION 362 20.1
LIST ALL EVENT LOGS 362 20.2 GET THE NEWEST ENTRIES FROM AN EVENT LOG
363 20.3 FIND EVENT LOG ENTRIES WITH SPECIFIC TEXT 364 20.4 RETRIEVE A
SPECIFIC EVENT LOG ENTRY 365 20.5 FIND EVENT LOG ENTRIES BY THEIR
FREQUENCY 367 20.6 BACK UP AN EVENT LOG 369 20.7 CREATE OR REMOVE AN
EVENT LOG 369 20.8 WRITE TO AN EVENT LOG 370 20.9 ACCESS EVENT LOGS OF A
REMOTE MACHINE 371 21. PROCESSES ^-R 373 21.0 INTRODUCTION - 373 21.1
LIST CURRENTLY RUNNING PROCESSES 373 21.2 LAUNCH A PROCESS 375 21.3 STOP
A PROCESS 376 21.4 PROGRAM: INVOKE A POWERSHELL EXPRESSION ON A REMOTE
MACHINE 377 22. SYSTEM SERVICES 380 22.0 INTRODUCTION 380 22.1 LIST ALL
RUNNING SERVICES 380 22.2 MANAGE A RUNNING SERVICE 382 22.3 ACCESS
SERVICES ON A REMOTE MACHINE 383 XII I TABLE OF CONTENTS 23. ACTIVE
DIRECTORY 385 23.0 INTRODUCTION 385 23.1 TEST ACTIVE DIRECTORY SCRIPTS
ON A LOCAL INSTALLATION 385 23.2 CREATE AN ORGANIZATIONAL UNIT 388 23.3
GET THE PROPERTIES OF AN ORGANIZATIONAL UNIT 388 23.4 MODIFY PROPERTIES
OF AN ORGANIZATIONAL UNIT 389 23.5 GET THE CHILDREN OF AN ACTIVE
DIRECTORY CONTAINER 390 23.6 CREATE A USER ACCOUNT 390 23.7 PROGRAM:
IMPORT USERS IN BULK TO ACTIVE DIRECTORY 391 23.8 SEARCH FOR A USER
ACCOUNT 393 23.9 GET AND LIST THE PROPERTIES OF A USER ACCOUNT 394 23.10
MODIFY PROPERTIES OF A USER ACCOUNT 395 23.11 CREATE A SECURITY OR
DISTRIBUTION GROUP 395 23.12 SEARCH FOR A SECURITY OR DISTRIBUTION GROUP
396 23.13 GET THE PROPERTIES OF A GROUP 397 23.14 FIND THE OWNER OF A
GROUP 398 23.15 MODIFY PROPERTIES OF A SECURITY OR DISTRIBUTION GROUP
399 23.16 ADD A USER TO A SECURITY OR DISTRIBUTION GROUP 399 23.17
REMOVE A USER FROM A SECURITY OR DISTRIBUTION GROUP 400 23.18 LIST A
USER S GROUP MEMBERSHIP 400 23.19 LIST THE MEMBERS OF A GROUP , 401
23.20 LIST THE USERS IN AN ORGANIZATIONAL UNIT 401 23.21 SEARCH FOR A
COMPUTER ACCOUNT . 402 23.22 GET AND LIST THE PROPERTIES OF A COMPUTER
ACCOUNT 403 24. ENTERPRISE COMPUTER MANAGEMENT . / 405 24.0 INTRODUCTION
; 405 24.1 PROGRAM: LIST LOGON OR LOGOFF SCRIPTS FOR A USER 405
24.2 PROGRAM: LIST STARTUP OR SHUTDOWN SCRIPTS FOR A MACHINE 407 24.3
ENABLE OR DISABLE THE WINDOWS FIREWALL 408 24.4 OPEN OR CLOSE PORTS IN
THE WINDOWS FIREWALL 409 24.5 PROGRAM: LIST ALL INSTALLED SOFTWARE^ 410
24.6 UNINSTALL AN APPLICATION 411 24.7 MANAGE SCHEDULED TASKS ON A
COMPUTER 412 24.8 RETRIEVE PRINTER INFORMATION 413 24.9 RETRIEVE PRINTER
QUEUE STATISTICS 414 24.10 MANAGE PRINTERS AND PRINT QUEUES 416 24.11
DETERMINE WHETHER A HOTFIX IS INSTALLED 417 24.12 PROGRAM: SUMMARIZE
SYSTEM INFORMATION 419 TABLE OF CONTENTS I XIII 24.13 RENEW A DHCP
LEASE 420 24.14 ASSIGN A STATIC IP ADDRESS . 421 24.15 LIST ALL IP
ADDRESSES FOR A COMPUTER 423 24.16 LIST NETWORK ADAPTER PROPERTIES 424
25. MANAGE AN EXCHANGE 2007 SERVER 426 25.0 INTRODUCTION 426 25.1
EXPERIMENT WITH EXCHANGE MANAGEMENT SHELL 427 25.2 AUTOMATE
WIZARD-GUIDED TASKS 427 25.3 MANAGE EXCHANGE USERS 428 25.4 MANAGE
MAILBOXES 430 25.5 MANAGE DISTRIBUTION GROUPS 431 25.6 MANAGE TRANSPORT
RULES , 431 25.7 MANAGE OUTLOOK WEB ACCESS 432 26. MANAGE AN OPERATIONS
MANAGER 2007 SERVER 434 26.0 INTRODUCTION 434 26.1 EXPERIMENT WITH THE
COMMAND SHELL 434 26.2 MANAGE OPERATIONS MANAGER AGENTS 435 26.3
SCHEDULE A MAINTENANCE WINDOW 436 26.4 GET, INSTALL, AND UNINSTALL
MANAGEMENT PACKS 437 26.5 ENABLE OR DISABLE RULES 438 26.6 LIST AND
START TASKS - 439 26.7 MANAGE ALERTS 439 PARTV. REFERENCES A. POWERSHELL
LANGUAGE AND ENVIRONMENT 443 COMMANDS AND EXPRESSIONS - 443 COMMENTS 444
VARIABLES 444 BOOLEANS ** 446 STRINGS 446 NUMBERS 448 ARRAYS AND LISTS
449 HASHTABLES (ASSOCIATIVE ARRAYS) 451 XML 452 SIMPLE OPERA TORS 453
XIV I TABLE OF CONTENTS COMPARISON OPERATORS 458 CONDITIONAL STATEMENTS
460 LOOPING STATEMENTS 464 WORKING WITH THE .NET FRAMEWORK 467 WRITING
SCRIPTS, REUSING FUNCTIONALITY 473 MANAGING ERRORS 478 FORMATTING OUTPUT
480 CAPTURING OUTPUT 482 TRACING AND DEBUGGING 482 COMMON CUSTOMIZATION
POINTS 484 B. REGULAR EXPRESSION REFERENCE 488 C. POWERSHELL AUTOMATIC
VARIABLES 496 D. STANDARD POWERSHELL VERBS 499 E. SELECTED .NET CLASSES
AND THEIR USES 502 F. WMI REFERENCE 509 G. SELECTED COM OBJECTS AND
THEIR USES 516 H. .NET STRING FORMATTING 519 STANDARD NUMERIC FORMAT
STRINGS 519 CUSTOM NUMERIC FORMAT STRINGS 520 I. .NET DATETIME
FORMATTING . . . 522 INDEX . * 529 TABLE OF CONTENTS I XV
|
adam_txt |
WINDOWS POWERSHELL COOKBOOK LEE HOLMES O'REILLY' BEIJING * CAMBRIDGE *
FARNHAM * KOLN * PARIS * SEBASTOPOL * TAIPEI * TOKYO TABLE OF CONTENTS
FOREWORD XVII PREFACE XXI PART I. TOUR A GUIDED TOUR OF WINDOWS
POWERSHELL 3 INTRODUCTION 3 AN INTERACTIVE SHELL 4 STRUCTURED COMMANDS
(CMDLETS) 6 DEEP INTEGRATION OF OBJECTS " 7 ADMINISTRATORS AS
FIRST-CLASS USERS 8 COMPOSABLE COMMANDS . 9 TECHNIQUES TO PROTECT YOU
FROM YOURSELF 9 COMMON DISCOVERY COMMANDS ' 10 UBIQUITOUS SCRIPTING 11
AD HOC DEVELOPMENT 12 BRIDGING TECHNOLOGIES 12 NAMESPACE NAVIGATION
THROUGH PROVIDERS * 14 MUCH, MUCH MORE 9 16 PART II. FUNDAMENTALS 1. THE
WINDOWS POWERSHELL INTERACTIVE SHELL 19 1.0 INTRODUCTION 19 1.1 RUN
PROGRAMS, SCRIPTS, AND EXISTING TOOLS 19 1.2 RUN A POWERSHELL COMMAND 21
1.3 CUSTOMIZE YOUR SHELL, PROFILE, AND PROMPT 22 1.4 FIND A COMMAND TO
ACCOMPLISH A TASK 25 1.5 GET HELP ON A COMMAND 26 1.6 PROGRAM: SEARCH
HELP FOR TEXT 28 1.7 INVOKE A POWERSHELL SCRIPT FROM OUTSIDE POWERSHELL
29 1.8 PROGRAM: RETAIN CHANGES TO ENVIRONMENT VARIABLES SET BY A BATCH
FILE30 1.9 GET THE SYSTEM DATE AND TIME 32 1.10 DETERMINE THE STATUS OF
THE LAST COMMAND 33 1.11 MEASURE THE DURATION OF A COMMAND 34 1.12
CUSTOMIZE THE SHELL TO IMPROVE YOUR PRODUCTIVITY 35 1.13 PROGRAM: LEARN
ALIASES FOR COMMON COMMANDS 36 1.14 ACCESS AND MANAGE YOUR CONSOLE
HISTORY 38 1.15 STORE THE OUTPUT OF A COMMAND INTO A FILE 39 1.16 ADD
INFORMATION TO THE END OF A FILE 41 1.17 RECORD A TRANSCRIPT OF YOUR
SHELL SESSION 41 1.18 DISPLAY THE PROPERTIES OF AN ITEM AS A LIST 42
1.19 DISPLAY THE PROPERTIES OF AN ITEM AS A TABLE 42 1.20 MANAGE THE
ERROR OUTPUT OF COMMANDS 44 1.21 CONFIGURE DEBUG, VERBOSE, AND PROGRESS
OUTPUT 45 1.22 EXTEND YOUR SHELL WITH ADDITIONAL SNAPINS 47 1.23 USE
CONSOLE FILES TO LOAD AND SAVE SETS OF SNAPINS 48 2. PIPELINES *. 49 2.0
INTRODUCTION 49 2.1 FILTER ITEMS IN A LIST OR COMMAND OUTPUT 50 2.2
PROGRAM: SIMPLIFY MOST WHERE-OBJECT FILTERS 51 2.3 PROGRAM:
INTERACTIVELY FILTER LISTS OF OBJECTS 52 2.4 WORK WITH EACH ITEM IN A
LIST OR COMMAND OUTPUT 54 2.5 AUTOMATE DATA-INTENSIVE TASKS . 56 3.
VARIABLES AND OBJECTS 61 3.0 INTRODUCTION 61 3.1 STORE INFORMATION IN
VARIABLES 62 3.2 ACCESS ENVIRONMENT VARIABLES 63 3.3 CONTROL ACCESS AND
SCOPE OF VARIABLES AND OTHER ITEMS 65 3.4 WORK WITH .NET OBJECTS 67 3.5
CREATE AN INSTANCE OF A .NET OBJECT 71 3.6 PROGRAM: CREATE INSTANCES OF
GENERIC OBJECTS 73 3.7 REDUCE TYPING FOR LONG CLASS NAMES 74 TABLE OF
CONTENTS 3.8 USE A COM OBJECT 76 3.9 LEARN ABOUT TYPES AND OBJECTS 77
3.10 GET DETAILED DOCUMENTATION ABOUT TYPES AND OBJECTS 78 3.11 ADD
CUSTOM METHODS AND PROPERTIES TO OBJECTS 80 3.12 ADD CUSTOM METHODS AND
PROPERTIES TO TYPES 82 4. LOOPING AND FLOW CONTROL 87 4.0 INTRODUCTION
87 4.1 MAKE DECISIONS WITH COMPARISON AND LOGICAL OPERATORS 87 4.2
ADJUST SCRIPT FLOW USING CONDITIONAL STATEMENTS 89 4.3 MANAGE LARGE
CONDITIONAL STATEMENTS WITH SWITCHES 90 4.4 REPEAT OPERATIONS WITH LOOPS
91 4.5 ADD A PAUSE OR DELAY 93 5. STRINGS AND UNSTRUCTURED TEXT. 95 5.0
INTRODUCTION 95 5.1 CREATE A STRING 95 5.2 CREATE A MULTILINE OR
FORMATTED STRING 97 5.3 PLACE SPECIAL CHARACTERS IN A STRING 98 5.4
INSERT DYNAMIC INFORMATION IN A STRING ' 99 5.5 PREVENT A STRING FROM
INCLUDING DYNAMIC INFORMATION 100 5.6 PLACE FORMATTED INFORMATION IN A
STRING 101 5.7 SEARCH A6TRING FOR TEXT OR A PATTERN 102 5.8 REPLACE TEXT
IN A STRING 105 5.9 CONVERT A STRING TO UPPER/LOWERCASE 106 5.10 TRIM A
STRING ' " , 107 5.11 FORMAT A DATE FOR OUTPUT^ ' 108 5.12 PROGRAM:
CONVERT TEXT STREAMS TO OBJECTS 110 5.13 GENERATE LARGE REPORTS'AND TEXT
STREAMS 114 6. CALCULATIONS AND MATH 117 6.0 INTRODUCTION 117 6.1
PERFORM SIMPLE ARITHMETIC * 117 6.2 PERFORM COMPLEX ARITHMETIC 119 6.3
MEASURE STATISTICAL PROPERTIES OF A LIST 121 6.4 WORK WITH NUMBERS AS
BINARY 123 6.5 SIMPLIFY MATH WITH ADMINISTRATIVE CONSTANTS 127 6.6
CONVERT NUMBERS BETWEEN BASES 128 TABLE OF CONTENTS I VII PART III.
COMMON TASKS 7. SIMPLE FILES 133 7.0 INTRODUCTION 133 7.1 GET THE
CONTENT OF A FILE 133 7.2 SEARCH A FILE FOR TEXT OR A PATTERN 135 7.3
PARSE AND MANAGE TEXT-BASED LOGFILES 136 7.4 PARSE AND MANAGE BINARY
FILES 139 7.5 CREATE A TEMPORARY FILE 141 7.6 SEARCH AND REPLACE TEXT IN
A FILE 143 8. STRUCTURED FILES 147 8.0 INTRODUCTION 147 8.1 ACCESS
INFORMATION IN AN XML FILE 147 8.2 PERFORM AN XPATH QUERY AGAINST AN XML
FILE 150 8.3 MODIFY DATA IN AN XML FILE 151 8.4 EASILY IMPORT AND EXPORT
YOUR STRUCTURED DATA 153 8.5 STORE THE OUTPUT OF A COMMAND IN A CSV FILE
155 8.6 IMPORT STRUCTURED DATA FROM A CSV FILE 156 8.7 USE EXCEL TO
MANAGE COMMAND OUTPUT 157 9. INTERNET-ENABLED SCRJPTS 160 9.0
INTRODUCTION 160 9.1 DOWNLOAD A FILE FROM THE INTERNET 160 9.2 DOWNLOAD
A WEB PA'GE FROM THE INTERNET 161 9.3 PROGRAM: GET-PAGEURLS -' 163 ; 9.4
PROGRAM: CONNECT-WEBSERVICE . 166 9.5 EXPORT COMMAND OUTPUT AS^A WEB
PAGE 170 9.6 PROGRAM: SEND AN EMAIL " 170 9.7 PROGRAM: INTERACT WITH
INTERNET PROTOCOLS 172 10. CODE REUSE R. 176 10.0 INTRODUCTION 176 10.1
WRITE A SCRIPT 176 10.2 WRITE A FUNCTION 179 10.3 WRITE A SCRIPT BLOCK
180 10.4 RETURN DATA FROM A SCRIPT, FUNCTION, OR SCRIPT BLOCK 182 10.5
PLACE COMMON FUNCTIONS IN A LIBRARY 184 10.6 ACCESS ARGUMENTS OF A
SCRIPT, FUNCTION, OR SCRIPT BLOCK 185 VIII I TABLE OF CONTENTS 10.7
ACCESS PIPELINE INPUT 188 10.8 WRITE PIPELINE-ORIENTED SCRIPTS WITH
CMDLET KEYWORDS 189 10.9 WRITE A PIPELINE-ORIENTED FUNCTION 193 11.
LISTS, ARRAYS, AND HASHTABLES 195 11.0 INTRODUCTION 195 11.1 CREATE AN
ARRAY OR LIST OF ITEMS 195 11.2 CREATE A JAGGED OR MULTIDIMENSIONAL
ARRAY , 197 11.3 ACCESS ELEMENTS OF AN ARRAY 198 11.4 VISIT EACH ELEMENT
OF AN ARRAY 199 11.5 SORT AN ARRAY OR LIST OF ITEMS 200 11.6 DETERMINE
WHETHER AN ARRAY CONTAINS AN ITEM 200 11.7 COMBINE TWO ARRAYS 201 11.8
FIND ITEMS IN AN ARRAY THAT MATCH A VALUE 202 11.9 REMOVE ELEMENTS FROM
AN ARRAY 203 11.10 FIND ITEMS IN AN ARRAY GREATER OR LESS THAN A VALUE
204 11.11 USE THE ARRAYLIST CLASS FOR ADVANCED ARRAY TASKS 205 11.12
CREATE A HASHTABLE OR ASSOCIATIVE ARRAY 206 11.13 SORT A HASHTABLE BY
KEY OR VALUE 207 12. USER INTERACTION 209 12.0 INTRODUCTION 209 12.1
READ A LINE OF USER INPUT 209 12.2 READ A KEY OF USER INPUT 210 12.3
PROGRAM: DISPLAY A MENU TO THE USER 211 12.4 DISPLAY MESSAGES AND OUTPUT
TO,THE USER 213 12.5 PROVIDE PROGRESS UPDATES ON LONG-RUNNING TASKS 216
12.6 WRITE CULTURE-AWARE SCRIPTS' . 217 12.7 PROGRAM: INVOKE A SCRIPT
BLOCK WITH ALTERNATE CULTURE SETTINGS 220 12.8 ACCESS FEATURES OF THE
HOST'S USER INTERFACE 221 12.9 PROGRAM: ADD A GRAPHICAL USER INTERFACE
TO YOUR SCRIPT 223 13. TRACING AND ERROR MANAGEMENT T. 226 13.0
INTRODUCTION 226 13.1 VIEW THE ERRORS GENERATED BY A COMMAND 226 13.2
HANDLE WARNINGS, ERRORS, AND TERMINATING ERRORS 228 13.3 OUTPUT
WARNINGS, ERRORS, AND TERMINATING ERRORS 230 13.4 DEBUG A SCRIPT 231
13.5 COLLECT DETAILED TRACES OF A SCRIPT OR COMMAND 234 13.6 PROGRAM:
ANALYZE A SCRIPT'S PERFORMANCE PROFILE 234 TABLE OF CONTENTS | IX 14.
ENVIRONMENTAL AWARENESS 240 14.0 INTRODUCTION * ' 240 14.1 VIEW AND
MODIFY ENVIRONMENT VARIABLES 240 14.2 ACCESS INFORMATION ABOUT YOUR
COMMAND'S INVOCATION 242 14.3 PROGRAM: INVESTIGATE THE INVOCATIONLNFO
VARIABLE 244 14.4 FIND YOUR SCRIPT'S NAME 246 14.5 FIND YOUR SCRIPT'S
LOCATION 247 14.6 FIND THE LOCATION OF COMMON SYSTEM PATHS 248 14.7
PROGRAM: SEARCH THE WINDOWS START MENU 250 14.8 GET THE CURRENT LOCATION
252 14.9 SAFELY BUILD FILE PATHS OUT OF THEIR COMPONENTS 253 14.10
INTERACT WITH POWERSHELL'S GLOBAL ENVIRONMENT 254 15. EXTEND THE REACH
OF WINDOWS POWERSHELL 255 15.0 INTRODUCTION 255 15.1 ACCESS WINDOWS
MANAGEMENT INSTRUMENTATION DATA 255 15.2 PROGRAM: DETERMINE PROPERTIES
AVAILABLE TO WMI FILTERS 257 15.3 PROGRAM: SEARCH FOR WMI CLASSES 258
15.4 USE .NET TO PERFORM ADVANCED WMI TASKS 261 15.5 CONVERT A VBSCRIPT
WMI SCRIPT TO POWERSHELL 263 15.6 AUTOMATE PROGRAMS USING COM SCRIPTING
INTERFACES 266 15.7 PROGRAM: QUERY A SQL DATA SOURCE 267 15.8 ACCESS
WINDOWS PERFORMANCE COUNTERS 270 15.9 PROGRAM: INVOKE NATIVE WINDOWS API
CALLS 271 15.10 PROGRAM: ADD INLINE C# TO YOUR POWERSHELL SCRIPT 273
15.11 ACCESS A .NET SDK LIBRARY / 276 15.12 CREATE YOUR OWN POWERSHELL
CFNDLET 279 15.13 ADD POWERSHELL SCRIPTING TO YOUR OWN PROGRAM 283 16.
SECURITY AND SCRIPT SIGNING 286 16.0 INTRODUCTION 286 16.1 ENABLE
SCRIPTING THROUGH AN EXECUTION POLICY 287 16.2 SIGN A POWERSHELL SCRIPT
OR FORMATTING FILE 289 16.3 PROGRAM: CREATE A SELF-SIGNED CERTIFICATE
291 16.4 MANAGE POWERSHELL SECURITY IN AN ENTERPRISE 292 16.5 VERIFY THE
DIGITAL SIGNATURE OF A POWERSHELL SCRIPT 295 16.6 SECURELY HANDLE
SENSITIVE INFORMATION 296 16.7 SECURELY REQUEST USERNAMES AND PASSWORDS
298 16.8 PROGRAM: START A PROCESS AS ANOTHER USER 300 X | TABLE OF
CONTENTS 16.9 SECURELY STORE CREDENTIALS ON DISK 301 16.10 ACCESS USER
AND MACHINE CERTIFICATES 303 16.11 PROGRAM: SEARCH THE CERTIFICATE STORE
304 PART IV. ADMINISTRATOR TASKS 17. FILESANDDIRECTORIES 309 17.0
INTRODUCTION . 309 17.1 FIND ALL FILES MODIFIED BEFORE A CERTAIN DATE
310 17.2 CLEAR OR REMOVE A FILE 311 17.3 MANAGE AND CHANGE THE
ATTRIBUTES OF A FILE 312 17.4 GET THE FILES IN A DIRECTORY 313 17.5 FIND
FILES THAT MATCH A PATTERN 314 17.6 MANAGE FILES THAT INCLUDE SPECIAL
CHARACTERS 317 17.7 PROGRAM: GET DISK USAGE INFORMATION 318 17.8
DETERMINE THE CURRENT LOCATION 320 17.9 MONITOR A FILE FOR CHANGES 321
17.10 PROGRAM: GET THE MD5 OR SHA1 HASH OF A FILE 321 17.11 CREATE A
DIRECTORY 324 17.12 REMOVE A FILE OR DIRECTORY 324 17.13 RENAME A FILE
OR DIRECTORY 325 17.14 MOVE A FILE OR DIRECTORY 326 17.15 GET THE ACL OF
A FILE OR DIRECTORY . 327 17.16 SET THE ACL OF A FILE OR DIRECTORY 329
17.17 PROGRAM: ADD EXTENDED FILE PROPERTIES TO FILES 330 17.18 PROGRAM:
CREATE A FILESYSTENRHARD LINK 332 17.19 PROGRAM: CREATE A ZIP ARCHIVE
334 18. THE WINDOWS REGISTRY 336 18.0 INTRODUCTION 336 18.1 NAVIGATE THE
REGISTRY 336 18.2 VIEW A REGISTRY KEY " 337 18.3 MODIFY OR REMOVE A
REGISTRY KEY VALUE 338 18.4 CREATE A REGISTRY KEY VALUE 339 18.5 REMOVE
A REGISTRY KEY 340 18.6 ADD A SITE TO AN INTERNET EXPLORER SECURITY ZONE
341 18.7 MODIFY INTERNET EXPLORER SETTINGS 343 18.8 PROGRAM: SEARCH THE
WINDOWS REGISTRY 344 TABLE OF CONTENTS | XI 18.9 GET THE ACL OF A
REGISTRY KEY 346 18.10 SET THE ACL OF A REGISTRY KEY 347 18.11 WORK WITH
THE REGISTRY OF A REMOTE COMPUTER 348 18.12 PROGRAM: GET REGISTRY ITEMS
FROM REMOTE MACHINES 349 18.13 PROGRAM: GET PROPERTIES OF REMOTE
REGISTRY KEYS 351 18.14 PROGRAM: SET PROPERTIES OF REMOTE REGISTRY KEYS
353 18.15 DISCOVER REGISTRY SETTINGS FOR PROGRAMS 354 19. COMPARING DATA
358 19.0 INTRODUCTION 358 19.1 COMPARE THE OUTPUT OF TWO COMMANDS 358
19.2 DETERMINE THE DIFFERENCES BETWEEN TWO FILES 359 19.3 VERIFY
INTEGRITY OF FILE SETS 360 20. EVENT LOGS 362 20.0 INTRODUCTION 362 20.1
LIST ALL EVENT LOGS 362 20.2 GET THE NEWEST ENTRIES FROM AN EVENT LOG
363 20.3 FIND EVENT LOG ENTRIES WITH SPECIFIC TEXT 364 20.4 RETRIEVE A
SPECIFIC EVENT LOG ENTRY 365 20.5 FIND EVENT LOG ENTRIES BY THEIR
FREQUENCY 367 20.6 BACK UP AN EVENT LOG 369 20.7 CREATE OR REMOVE AN
EVENT LOG 369 20.8 WRITE TO AN EVENT LOG 370 20.9 ACCESS EVENT LOGS OF A
REMOTE MACHINE 371 21. PROCESSES ^-R 373 21.0 INTRODUCTION ' - 373 21.1
LIST CURRENTLY RUNNING PROCESSES 373 21.2 LAUNCH A PROCESS 375 21.3 STOP
A PROCESS 376 21.4 PROGRAM: INVOKE A POWERSHELL EXPRESSION ON A REMOTE
MACHINE 377 22. SYSTEM SERVICES 380 22.0 INTRODUCTION 380 22.1 LIST ALL
RUNNING SERVICES 380 22.2 MANAGE A RUNNING SERVICE 382 22.3 ACCESS
SERVICES ON A REMOTE MACHINE 383 XII I TABLE OF CONTENTS 23. ACTIVE
DIRECTORY 385 23.0 INTRODUCTION 385 23.1 TEST ACTIVE DIRECTORY SCRIPTS
ON A LOCAL INSTALLATION 385 23.2 CREATE AN ORGANIZATIONAL UNIT 388 23.3
GET THE PROPERTIES OF AN ORGANIZATIONAL UNIT 388 23.4 MODIFY PROPERTIES
OF AN ORGANIZATIONAL UNIT 389 23.5 GET THE CHILDREN OF AN ACTIVE
DIRECTORY CONTAINER 390 23.6 CREATE A USER ACCOUNT 390 23.7 PROGRAM:
IMPORT USERS IN BULK TO ACTIVE DIRECTORY 391 23.8 SEARCH FOR A USER
ACCOUNT 393 23.9 GET AND LIST THE PROPERTIES OF A USER ACCOUNT 394 23.10
MODIFY PROPERTIES OF A USER ACCOUNT 395 23.11 CREATE A SECURITY OR
DISTRIBUTION GROUP 395 23.12 SEARCH FOR A SECURITY OR DISTRIBUTION GROUP
396 23.13 GET THE PROPERTIES OF A GROUP 397 23.14 FIND THE OWNER OF A
GROUP 398 23.15 MODIFY PROPERTIES OF A SECURITY OR DISTRIBUTION GROUP
399 23.16 ADD A USER TO A SECURITY OR DISTRIBUTION GROUP 399 23.17
REMOVE A USER FROM A SECURITY OR DISTRIBUTION GROUP 400 23.18 LIST A
USER'S GROUP MEMBERSHIP 400 23.19 LIST THE MEMBERS OF A GROUP , 401
23.20 LIST THE USERS IN AN ORGANIZATIONAL UNIT 401 23.21 SEARCH FOR A
COMPUTER ACCOUNT . 402 23.22 GET AND LIST THE PROPERTIES OF A COMPUTER
ACCOUNT 403 24. ENTERPRISE COMPUTER MANAGEMENT . / 405 24.0 INTRODUCTION
; ' '' 405 24.1 PROGRAM: LIST LOGON OR LOGOFF SCRIPTS FOR A USER 405
24.2 PROGRAM: LIST STARTUP OR SHUTDOWN SCRIPTS FOR A MACHINE 407 24.3
ENABLE OR DISABLE THE WINDOWS FIREWALL 408 24.4 OPEN OR CLOSE PORTS IN
THE WINDOWS FIREWALL 409 24.5 PROGRAM: LIST ALL INSTALLED SOFTWARE^ 410
24.6 UNINSTALL AN APPLICATION 411 24.7 MANAGE SCHEDULED TASKS ON A
COMPUTER 412 24.8 RETRIEVE PRINTER INFORMATION 413 24.9 RETRIEVE PRINTER
QUEUE STATISTICS 414 24.10 MANAGE PRINTERS AND PRINT QUEUES 416 24.11
DETERMINE WHETHER A HOTFIX IS INSTALLED 417 24.12 PROGRAM: SUMMARIZE
SYSTEM INFORMATION 419 TABLE OF CONTENTS I XIII 24.13 RENEW A DHCP
LEASE 420 24.14 ASSIGN A STATIC IP ADDRESS . 421 24.15 LIST ALL IP
ADDRESSES FOR A COMPUTER 423 24.16 LIST NETWORK ADAPTER PROPERTIES 424
25. MANAGE AN EXCHANGE 2007 SERVER 426 25.0 INTRODUCTION 426 25.1
EXPERIMENT WITH EXCHANGE MANAGEMENT SHELL 427 25.2 AUTOMATE
WIZARD-GUIDED TASKS 427 25.3 MANAGE EXCHANGE USERS 428 25.4 MANAGE
MAILBOXES 430 25.5 MANAGE DISTRIBUTION GROUPS 431 25.6 MANAGE TRANSPORT
RULES , 431 25.7 MANAGE OUTLOOK WEB ACCESS 432 26. MANAGE AN OPERATIONS
MANAGER 2007 SERVER 434 26.0 INTRODUCTION 434 26.1 EXPERIMENT WITH THE
COMMAND SHELL 434 26.2 MANAGE OPERATIONS MANAGER AGENTS 435 26.3
SCHEDULE A MAINTENANCE WINDOW 436 26.4 GET, INSTALL, AND UNINSTALL
MANAGEMENT PACKS 437 26.5 ENABLE OR DISABLE RULES 438 26.6 LIST AND
START TASKS - 439 26.7 MANAGE ALERTS 439 PARTV. REFERENCES A. POWERSHELL
LANGUAGE AND ENVIRONMENT 443 COMMANDS AND EXPRESSIONS - 443 COMMENTS 444
VARIABLES 444 BOOLEANS ** 446 STRINGS 446 NUMBERS 448 ARRAYS AND LISTS
449 HASHTABLES (ASSOCIATIVE ARRAYS) 451 XML 452 SIMPLE OPERA'TORS 453
XIV I TABLE OF CONTENTS COMPARISON OPERATORS 458 CONDITIONAL STATEMENTS
460 LOOPING STATEMENTS 464 WORKING WITH THE .NET FRAMEWORK 467 WRITING
SCRIPTS, REUSING FUNCTIONALITY 473 MANAGING ERRORS 478 FORMATTING OUTPUT
480 CAPTURING OUTPUT 482 TRACING AND DEBUGGING 482 COMMON CUSTOMIZATION
POINTS 484 B. REGULAR EXPRESSION REFERENCE 488 C. POWERSHELL AUTOMATIC
VARIABLES 496 D. STANDARD POWERSHELL VERBS 499 E. SELECTED .NET CLASSES
AND THEIR USES 502 F. WMI REFERENCE 509 G. SELECTED COM OBJECTS AND
THEIR USES 516 H. .NET STRING FORMATTING 519 STANDARD NUMERIC FORMAT
STRINGS 519 CUSTOM NUMERIC FORMAT STRINGS 520 I. .NET DATETIME
FORMATTING .'". . 522 INDEX '.'* 529 TABLE OF CONTENTS I XV |
any_adam_object | 1 |
any_adam_object_boolean | 1 |
author | Holmes, Lee |
author_facet | Holmes, Lee |
author_role | aut |
author_sort | Holmes, Lee |
author_variant | l h lh |
building | Verbundindex |
bvnumber | BV023354188 |
classification_rvk | ST 261 |
ctrlnum | (OCoLC)255544656 (DE-599)DNB984964894 |
dewey-full | 004 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 004 - Computer science |
dewey-raw | 004 |
dewey-search | 004 |
dewey-sort | 14 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
discipline_str_mv | Informatik |
edition | 1. ed. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01722nam a2200433 c 4500</leader><controlfield tag="001">BV023354188</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20090116 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">080619s2008 |||| 00||| eng d</controlfield><datafield tag="015" ind1=" " ind2=" "><subfield code="a">07N320025</subfield><subfield code="2">dnb</subfield></datafield><datafield tag="016" ind1="7" ind2=" "><subfield code="a">984964894</subfield><subfield code="2">DE-101</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0596528493</subfield><subfield code="c">: 49.99, EUR 48.00 (freier Pr.)</subfield><subfield code="9">0-596-52849-3</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780596528492</subfield><subfield code="c">: 49.99, EUR 48.00 (freier Pr.)</subfield><subfield code="9">978-0-596-52849-2</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)255544656</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)DNB984964894</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakddb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-1051</subfield><subfield code="a">DE-92</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">004</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 261</subfield><subfield code="0">(DE-625)143633:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">004</subfield><subfield code="2">sdnb</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Holmes, Lee</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Windows PowerShell cookbook</subfield><subfield code="b">[the complete guide to Microsoft's new command shell and scripting language]</subfield><subfield code="c">Lee Holmes</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">1. ed.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Beijing [u.a.]</subfield><subfield code="b">O'Reilly</subfield><subfield code="c">2008</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXVII, 553 S.</subfield><subfield code="c">24 cm</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Windows PowerShell 3.0</subfield><subfield code="0">(DE-588)1031799583</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Windows PowerShell</subfield><subfield code="0">(DE-588)7563304-8</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Windows PowerShell</subfield><subfield code="0">(DE-588)7563304-8</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Windows PowerShell 3.0</subfield><subfield code="0">(DE-588)1031799583</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HEBIS Datenaustausch Darmstadt</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016537758&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-016537758</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield></record></collection> |
id | DE-604.BV023354188 |
illustrated | Not Illustrated |
index_date | 2024-07-02T21:06:23Z |
indexdate | 2024-07-09T21:16:40Z |
institution | BVB |
isbn | 0596528493 9780596528492 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-016537758 |
oclc_num | 255544656 |
open_access_boolean | |
owner | DE-1051 DE-92 |
owner_facet | DE-1051 DE-92 |
physical | XXVII, 553 S. 24 cm |
publishDate | 2008 |
publishDateSearch | 2008 |
publishDateSort | 2008 |
publisher | O'Reilly |
record_format | marc |
spelling | Holmes, Lee Verfasser aut Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] Lee Holmes 1. ed. Beijing [u.a.] O'Reilly 2008 XXVII, 553 S. 24 cm txt rdacontent n rdamedia nc rdacarrier Windows PowerShell 3.0 (DE-588)1031799583 gnd rswk-swf Windows PowerShell (DE-588)7563304-8 gnd rswk-swf Windows PowerShell (DE-588)7563304-8 s DE-604 Windows PowerShell 3.0 (DE-588)1031799583 s 1\p DE-604 HEBIS Datenaustausch Darmstadt application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016537758&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis 1\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk |
spellingShingle | Holmes, Lee Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] Windows PowerShell 3.0 (DE-588)1031799583 gnd Windows PowerShell (DE-588)7563304-8 gnd |
subject_GND | (DE-588)1031799583 (DE-588)7563304-8 |
title | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] |
title_auth | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] |
title_exact_search | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] |
title_exact_search_txtP | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] |
title_full | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] Lee Holmes |
title_fullStr | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] Lee Holmes |
title_full_unstemmed | Windows PowerShell cookbook [the complete guide to Microsoft's new command shell and scripting language] Lee Holmes |
title_short | Windows PowerShell cookbook |
title_sort | windows powershell cookbook the complete guide to microsoft s new command shell and scripting language |
title_sub | [the complete guide to Microsoft's new command shell and scripting language] |
topic | Windows PowerShell 3.0 (DE-588)1031799583 gnd Windows PowerShell (DE-588)7563304-8 gnd |
topic_facet | Windows PowerShell 3.0 Windows PowerShell |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016537758&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT holmeslee windowspowershellcookbookthecompleteguidetomicrosoftsnewcommandshellandscriptinglanguage |