The Component Object Model (COM) and the .NET Framework are two object models you’ll work with frequently in PowerShell. Although many applications provide scripting and administrative objects through COM, .NET Framework and even PowerShell cmdlets are becoming increasingly prevalent.
You can create instances of COM objects using the New-Object cmdlet. The basic syntax is
New-Object [-Set AssocArray] [-Strict] [-ComObject] String
When creating the object, set the –ComObject parameter to the object’s programmatic identifier (ProgID). Most well-known COM objects can be used within PowerShell, including those for Windows Script Host (WSH). The following example creates a shortcut ...