How to keep scripts deployed and run on a new machine automatically?
I'm able to have a dynamic collection with SCCM and keep a deployment going indefinitely. Do the scripts keep running if they do not have a schedule set. I just want the script to run when a new workstation appears to Kace or falls into a label.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Nico_K
9 years ago
Create a label which is called "new machines" or similar, which checks how long the machine is part of the inventory.
I use this one:
I use this one:
select MACHINE.*, C.CLIENT_CONNECTED, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_SECONDS
from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION O ON O.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION C ON C.KUID = MACHINE.KUID AND O.ORGANIZATION_ID = 1
where DATE(CREATED) BETWEEN DATE_SUB(CURDATE(), INTERVAL 10 Day) AND CURDATE()
I bound all scripts which need to run on the new systems (power settings etc), managed installs for basic software installs and a high frequency patch run on this label, so the new machines have the most current software installations, current patch label and all settings which need to be made by scripts, are provided to these systems in a short time period.
As soon they grew "older" they leave the label and the scripts etc don't run anymore to these systems.
I chose 10 day because a few of my test systems are on remote locations and are not always avaiable.
As soon they grew "older" they leave the label and the scripts etc don't run anymore to these systems.
I chose 10 day because a few of my test systems are on remote locations and are not always avaiable.