Jump to content

WMI and puts


Recommended Posts

So I posted a similar question a while back (year or so), but after working with you guys found out that what I was working on wasn't possible, but the question I had still is making me wonder.

So the question is this, how do I edit a value in WMI? I've looked through the forum posts and see hundreds of posts on reading from WMI etc but not really too much on simply changing a value.

I have this code:

If $colMember.SiteCode <> "MOB" Then
    $colMember.SiteCode = "MOB"
    $colMember.Put_
Endif

Now unlike my last post I have verified this Field is Read\Write ;)

The script always errors at the .put_ though?

Is this not the correct syntax for this?

Thanks,

Terry

Link to comment
Share on other sites

It depends. The .put (or .put_) method is not valid for all objects. Exactly what type of object is $colMember?

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...