![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Vista | WMI objects Hi everyone.. i m new to powershell and windows... i need to create instances of wmi objects through powershell.. we can extract using getwmiobject... dont we have any option to set a wmiobject??? Thanks in advance |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WMI objects Hi! An example of setting properties on a WMIObject: Set a variable: $wmiobject = Get-WmiObject win32_service Select the first object: $wmiobject[0] Look at the methods and properties of the object: $wmiobject[0] | gm Test a method, like StartService: $wmiobject[0].StartService() Set a property: $wmiobject[1].StartMode="Automatic" Save the property: $wmiobject[1].Put() -- Jan Egil Ring --------------------- http://janegilring.wordpress.com http://powershellug.ning.com "hegde" <guest@xxxxxx-email.com> wrote in message news:71fae0b14672f231b1b7bc02f7e980de@xxxxxx-gateway.com... Quote: > > Hi everyone.. > > i m new to powershell and windows... > > i need to create instances of wmi objects through powershell.. > > we can extract using getwmiobject... > > dont we have any option to set a wmiobject??? > > Thanks in advance > > > -- > hegde |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Functions and Objects | PowerShell | |||
| NET objects to COM objects | .NET General | |||
| Using SMO objects | PowerShell | |||
| Retrieve COM-Objects | PowerShell | |||
| types of the help objects. | PowerShell | |||