Monday, January 12, 2009

SCCM Client Discovery Data Cycle intiate on remote systems

To intiate Discovery Data Cycle run this Script:---
==================================================================================================================================================================
 
On Error Resume Next
Dim oCPAppletMgr
Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
Dim oClientActions
Set oClientActions = oCPAppletMgr.GetClientActions()
Dim oClientAction
For Each oClientAction In oClientActions
If oClientAction.Name = "Discovery Data Collection Cycle" Then
oClientAction.PerformAction
End If
If oClientAction.Name = "Request & Evaluate Machine Policy" Then
oClientAction.PerformAction
End If
Next
================================================================================================================================================
 
 
The above script will run on only local system. Ofcourse every one wants to run this in remote systems so i created a batch file to run on targeted list of systems ... Here is the Batch file....
 
===========================================================================
 
ECHO *********** %1 copy
xcopy /y DDR.vbs \\%1\admin$\temp
ECHO *********** %1 Execute
psexec \\%1 wscript.exe \\%1\admin$\temp\DDR.vbs
 

===========================================================================

 
and the synatx to call the batch file is  ""For /F %a in (list.txt) do one.bat %a"""" Include systems name in list.txt file
 
==========================================================================
 

-------------------
Thanks,
http://sccm07.blogspot.com/

No comments: