Quantcast
Viewing all articles
Browse latest Browse all 12874

Looking for help on a kix script that will run WSUS commands based off of what OU a computer is in.

Here is my request and am hoping that I don't have to re-invent the wheel here...

I have been tasked with taking over our WSUS environment, it has been neglected for some time now.  So I have all the patches ready...GPO for WSUS is all set up, everthing is a go.  HOWEVER, I ran into a problem where systems would drop out of WSUS...which have found the fix for that by running a .bat script that stops wuauserv, removes a few reg values, re-starts wuauserv, then "resetauthorization"...

I have this *.bat file set to run at startup via the WSUS GPO, with a marker file check so if it ran once already it won't run again.  HOWEVER since this is in the startup GPO, it will ONLY run when the system(s) are restarted.

I wanted to add those particular section into our login script which is a kix script, so I got all the "functions" to work, the stopping of wuauserv, del reg values etc.  but what I have a hard time getting to work or figure out is how I can get a kix script to look into AD and if %computername% exist is a provided OU then run the functions I need to run to clear out the WSUS ID from the local system.  

Sure, one can say, just run in the logon script regardless.  That is all fine and good but I don't want this ran on servers.  JUST PC / Laptops.  And since our users log into our servers, their login scripts will run regardless of the system.  So I really need a way to figure out how to get a script to look at AD, look at what OU the system the user is logging into is a member of and then determine if it runs the WSUS commands or not.  

If someone has done this before NOT using KIX, I am all ears as well...and I wish I could say I'll just reboot the systems, but I just don't have that luxury.

and I am NOT a KIX guru...so baby me a bit please....


Viewing all articles
Browse latest Browse all 12874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>