Online Test Banks
Score higher
See Online Test Banks
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

Creating COM and .NET Objects with Windows PowerShell 2

Part of the Windows PowerShell 2 For Dummies Cheat Sheet

PowerShell 2 enables you to automate your Windows operating system, which entails dealing with objects: COM objects are created using the New-Object method with the -comobject parameter, whereas .NET objects are created by enclosing the class name in square brackets. An example of each follows:

$objWord = New-Object -comobject "Word.Application"
$objWord.visible = $true
$ips = [System.Net.Dns]::GetHostAddresses("")
$ips | Select-Object IPAddressToString
blog comments powered by Disqus

Windows PowerShell 2 For Dummies Cheat Sheet


Inside Sweepstakes

Win $500. Easy.