Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Using the registry provider to manage the <strong>Windows</strong> registry ..........87<br />
The two registry drives ......................................87<br />
Understanding the variable provider ...............................97<br />
Exploring <strong>PowerShell</strong> providers: step-<strong>by</strong>-step exercises ..............101<br />
Chapter 3 quick reference ........................................106<br />
Chapter 4 Using <strong>PowerShell</strong> Remoting and Jobs 107<br />
Understanding <strong>Windows</strong> <strong>PowerShell</strong> remoting .....................107<br />
Classic remoting ...........................................107<br />
WinRM ..................................................112<br />
Using <strong>Windows</strong> <strong>PowerShell</strong> jobs ..................................119<br />
Using <strong>Windows</strong> <strong>PowerShell</strong> remoting: step-<strong>by</strong>-step exercises .........127<br />
Chapter 4 quick reference ........................................130<br />
Chapter 5 Using <strong>PowerShell</strong> Scripts 131<br />
Why write <strong>Windows</strong> <strong>PowerShell</strong> scripts? ............................131<br />
Scripting fundamentals ..........................................133<br />
Running <strong>Windows</strong> <strong>PowerShell</strong> scripts .........................133<br />
Enabling <strong>Windows</strong> <strong>PowerShell</strong> scripting support ...............134<br />
Transitioning from <strong>com</strong>mand line to script ....................136<br />
Running <strong>Windows</strong> <strong>PowerShell</strong> scripts .........................138<br />
Understanding variables and constants .......................141<br />
Use of constants ...........................................146<br />
Using the While statement .......................................147<br />
Constructing the While statement in <strong>PowerShell</strong> ...............148<br />
A practical example of using the While statement. . . . . . . . . . . . . .150<br />
Using special features of <strong>Windows</strong> <strong>PowerShell</strong>. . . . . . . . . . . . . . . . .150<br />
Using the Do...While statement ...................................151<br />
Using the range operator ...................................152<br />
Operating over an array ....................................152<br />
Casting to ASCII values .....................................152<br />
Contents ix