Jump to content

Recommended Posts

Posted

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

Posted

So of course as soon as I hit post, the next test I did worked... arrgg

Turned out all I changed was doing a ObjGet instead of a ObjCreate.

Anyway seems to be working now.

Thanks,

Terry

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
×
×
  • Create New...