Does ImmyBot have any semaphore/critical section style functions?
I am backing up printer drivers from the server for deployment to endpoints so that the printer deployment GPO’s work since Print Nightmare, and building the printer driver bundle over and over again is inefficient, so I’d rather cache that on the server such that the first install that runs does the work on the server and then the next install that runs just reuses the printer driver bundle.
So the logic would be like:
Take the lock
check if the printer driver has already been bundled
if not then bundle up the files and save somewhere
Release the lock
The lock would only be held for a few minutes in the worst case (that the driver doesn’t exist) and the only scripts held up would be the ones that are about to save themselves a few minutes work.
I can implement my own easy enough but don’t want to re-invent any wheels