taurus905 Posted June 12, 2015 Posted June 12, 2015 When Configuration Manager is installed on a Windows 7 pc, it shows in Control Panel.I'd like to use WMI to query remote PCs to see if Configuration Manager is installed.Or, is there another way to accomplish the same goal?Thank you in advance.taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Bert Posted June 12, 2015 Posted June 12, 2015 The configuration manager is I believe is a snap-in. You should be able to determine this in Active Directory. The Vollatran project My blog: http://www.vollysinterestingshit.com/
taurus905 Posted June 12, 2015 Author Posted June 12, 2015 Thanks for the suggestion, Bert. But I didn't have any luck finding anything along those lines.However, I did find this:http://blogs.technet.com/b/configmgrdogs/archive/2014/09/05/wmi-powershell-and-the-configuration-manager-client.aspx(Invoke-WMIMethod -ComputerName $remoteMachine –Namespace root\ccm –Class SMS_Client –Name GetAssignedSite).sSiteCodeNow I will just turn the powershell command into an AutoIt script with a list of my 800+ PCs. Where the command fails, Configuration Manager is not installed on that machine. "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Jewtus Posted June 12, 2015 Posted June 12, 2015 This function is native to windows, but its a little slow in my experience.https://msdn.microsoft.com/en-us/library/bb742610.aspx Wmic does what you are talking about without needing to enable powershell scripts (which if you don't have admin access on the machine, you won't be able to enable)
Moderators JLogan3o13 Posted June 12, 2015 Moderators Posted June 12, 2015 Why not just use the SCCM db itself to query for which machines have an active heartbeat? You can use the SCCM UDF in my signature to do it a couple of different ways: return all good heartbeats:#include <_SCCM.au3> #include <Array.au3> Local $sServer = "afic-sccm" Local $sCode = "P01" _SCCM_Connect($sServer, $sCode) If Not @error Then $myReturn = _SCCM_Search("") If IsArray($myReturn) Then _ArrayDisplay($myReturn)Search just for one machine:#include <_SCCM.au3> #include <Array.au3> Local $sServer = "afic-sccm" Local $sCode = "P01" _SCCM_Connect($sServer, $sCode) If Not @error Then $myReturn = _SCCM_Search("ThatPeskyPC") ConsoleWrite(((IsArray($myReturn)) ? "Asset not found in database" : "Asset alive and responding to heartbeat") & @CRLF) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
taurus905 Posted June 12, 2015 Author Posted June 12, 2015 This function is native to windows, but its a little slow in my experience.https://msdn.microsoft.com/en-us/library/bb742610.aspx Wmic does what you are talking about without needing to enable powershell scripts (which if you don't have admin access on the machine, you won't be able to enable)Thank you for the link, Jewtus.It will come in handy in the future. Luckily, I do have admin access to all of our PCs. "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
taurus905 Posted June 12, 2015 Author Posted June 12, 2015 Why not just use the SCCM db itself to query for which machines have an active heartbeat? You can use the SCCM UDF in my signature to do it a couple of different ways: return all good heartbeats:#include <_SCCM.au3> #include <Array.au3> Local $sServer = "afic-sccm" Local $sCode = "P01" _SCCM_Connect($sServer, $sCode) If Not @error Then $myReturn = _SCCM_Search("") If IsArray($myReturn) Then _ArrayDisplay($myReturn)Search just for one machine:#include <_SCCM.au3> #include <Array.au3> Local $sServer = "afic-sccm" Local $sCode = "P01" _SCCM_Connect($sServer, $sCode) If Not @error Then $myReturn = _SCCM_Search("ThatPeskyPC") ConsoleWrite(((IsArray($myReturn)) ? "Asset not found in database" : "Asset alive and responding to heartbeat") & @CRLF) Hello JLogan3o13,Great UDF!This will save me so much time.Thank you for making it available to all of the AutoIt community.taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now