Quick script for File Collection? (Full Version)

All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003



Message


cstevens -> Quick script for File Collection? (10/9/2008 2:06:58 PM)

Anyone have a script to trigger File Collection on the local system?

Thanks!




okis14 -> RE: Quick script for File Collection? (10/9/2008 2:31:42 PM)

This information is just off the top of my head so double check this as I haven't used file collection in ages.

The file collection schedule id is {000000000-0000-0000-0000-000000000010} (I might be missing a zero somewhere in there) so you just pass that as a parameter to an already created script in the SMS Tool kit called sendsched.vbs.  This script can be run remotely or locally and can be used for any of the SMS client actions ie. Machine Policy, HWI, SWI, etc.




criticalerror -> RE: Quick script for File Collection? (10/9/2008 2:32:35 PM)

Setup the file collection parameters in Software Inventory and then set the schedule for 5 minutes later.

Jeremy




cstevens -> RE: Quick script for File Collection? (10/9/2008 2:34:51 PM)

Software Inventory is too intensive, and only is allowed to run once per week by policy; I just want to trigger File Collection after I execute a script that creates a particular file I want to collect.




criticalerror -> RE: Quick script for File Collection? (10/9/2008 2:52:55 PM)

So you need a script to scan the SMS DB for machines that contain a certain file and then collect that file to a central depository without using SMS? I would try what Okis suggested but it wont be any less intensive and uses the same processes as SWI .. thats how file collection within SMS works.




Rickym61 -> RE: Quick script for File Collection? (10/9/2008 3:07:04 PM)

This should do it, its from the book SMS 2003 Recipies, a must for any SMS Admin. You can download some the scripts from the book here http://www.apress.com/book/downloadfile/3017

Const FILECOLL = "{00000000-0000-0000-0000-000000000010}"
strComputer = "."
Set objCCM = GetObject("winmgmts://" & strComputer & "/root/ccm")
Set objClient = objCCM.Get("SMS_Client")
Set objSched = objClient.Methods_("TriggerSchedule"). _
inParameters.SpawnInstance_()
objSched.sScheduleID = FILECOLL
objCCM.ExecMethod "SMS_Client", "TriggerSchedule", objSched




cstevens -> RE: Quick script for File Collection? (10/9/2008 3:11:39 PM)

Sweet, thanks!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.34375