Jump to content
Sign in to follow this  

connect to SCCM

Recommended Posts



I'm really new to AutoIT but think it's a great tool to automate things and want to use it more but have now run into a big brick wall...

My problem:

I want to connect to our SCCM database and run (for starters) a simple query and catch the result of that query. I've searched the Internet and this forum for some hints or examples but didn't find anything really useful. So if someone please just can get me started with a really basic example on how to do this I would be really grateful.

Here is my first few struggling steps (got all of the code from another thread: http://www.autoitscript.com/forum/index.ph...mp;hl=query+sms ) but it doesn't work.

Dim $Services, $Query, $CollectionSet, $Collection
$Services = objget("winmgmts:\\SERVERNAME\root\sms\site_SITECODE")
$Query = "SELECT SYS.Netbios_Name0, MAC.MAC_Addresses0, IP.IP_Addre......
$CollectionSet = $Services.ExecQuery($Query, "", 48)
For $Collection In $CollectionSet

Is this the way you are "suppose" to connect to a SCCM database and run a query? If anybody have a good example that actully works I'll be thrilled! ยด

Thanks! /Peter

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.