Scripting >> Powershell >> Syntax >> How to create objects

To create an instance of a com object New-Object -comobject <ProgID> $a = New-Object - comobject "wscript.network" $a.username To create an instance of a .Net Framework object. Parameters can be passed if required New-Object -type <.Net Object> $d = New-Object -Type System.DateTime 2006,12,25 $d.get_DayOfWeek()