Specifications

Working with Shortcuts .........................................................682
Working with Registry Entries
.................................................685
Working with Environment Variables
.......................................687
Programming the WshNetwork Object
.............................................689
Referencing the WshNetwork Object
........................................689
WshNetwork Object Properties
...............................................689
Mapping Network Printers
.....................................................689
Mapping Network Drives
.......................................................690
Example: Scripting Internet Explorer
...............................................691
Displaying a Web Page
...........................................................691
Navigating Pages
..................................................................692
Using the InternetExplorer Object’s Properties
...........................693
Running Through a Sample Script
...........................................693
Programming the Windows Management
Instrumentation Service
...............................................................695
Referencing the WMI Service Object
........................................695
Returning Class Instances
.......................................................696
Scripting a Remote Computer
.................................................700
31 Scripting Windows with PowerShell 703
Getting Started with PowerShell
......................................................704
Starting a PowerShell Session
..................................................704
Understanding PowerShell Cmdlets
.........................................705
Running PowerShell Cmdlets
.........................................................709
Scripting Objects
..........................................................................714
Returning Object Members
.....................................................714
Selecting Object Members
......................................................715
A Brief Aside About Formatting Output
....................................717
Filtering Object Instances
.......................................................719
Sorting Object Instances
........................................................720
Assigning an Object to a Variable
............................................722
Working with Object Properties
..............................................723
Returning the Value of a Property
............................................723
Setting the Value of a Property
................................................723
Working with Object Methods
................................................724
Working with Object Collections
.............................................724
Creating PowerShell Scripts
............................................................726
Setting the Script Execution Policy
..........................................726
Working with the PowerShell Integrated
Scripting Environment
........................................................726
Running PowerShell Scripts
....................................................728
Contents
xix