Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » New-Object

New-Object - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Creates an instance of a Microsoft .NET Framework or COM object.

New-Object -ComObject <string> [-Strict] [-Property <hashtable>] [<CommonParameters>]

New-Object [-TypeName] <string> [[-ArgumentList] <Object[]>] [-Property <hashtable>] [<CommonParameters>]

The New-Object cmdlet creates an instance of a .NET Framework or COM object. 

You can specify either the type of a .NET Framework class or a ProgID of a COM object. By default, you type the ful
ly qualified name of a .NET Framework class and the cmdlet returns a reference to an instance of that class. To cre
ate an instance of a COM object, use the ComObject parameter and specify the ProgID of the object as its value.