Powershell option:
([wmiclass]'ROOT\ccm:SMS_Client').TriggerSchedule('{00000000-0000-0000-0000-000000000001}')
WMIC option:
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule
"{00000000-0000-0000-0000-000000000001}" /NOINTERACTIVE
VBScript option:
'Declare Variables
On Error Resume Next
Set sho = CreateObject("WScript.Shell")
strSystemRoot = sho.expandenvironmentstrings("%SystemRoot%")
strCurrentDir = Left(Wscript.ScriptFullName, (InstrRev(Wscript.ScriptFullName,
"\") -1))
' Get a connection to the "root\ccm\invagt" namespace (where the Inventory
agent lives)
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
sInventoryActionID = "{00000000-0000-0000-0000-000000000001}"
'Run a Hardware Inventory
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Hardware Inventory") > 0 Then action.PerformAction
End If
Next
From: [email protected] [mailto:[email protected]] On
Behalf Of Timothy Ransom
Sent: Tuesday, January 14, 2014 4:17 PM
To: [email protected]
Subject: [mssms] SCCM 2007 - script to force hw inventory
Hi,
Does anyone have a script to force hw inventory? Don't need to force a full hw
inventory resync like Rclick tools?
Just force hw inventory daily for a collection of servers to send deltas for
reporting.
Thanks,
Tim
**********************************************************************************************
GDOL CONFIDENTIALITY NOTICE: This transmission may contain confidential
information protected by state or federal law. The information is intended only
for use consistent with the state business discussed in this transmission. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or the taking of any action based on the
contents is strictly prohibited. If you have received this transmission in
error, please delete this email and notify the sender immediately. Your
cooperation is appreciated.
**********************************************************************************************