IIS Recycling Application Pools

October 3, 2014

So I wrote a little VBScript to help recycle all the application pools on a single server. This will by far be the fastest script you’ll find out here. VBScript on error resume next Set args=wScript.Arguments If args.count<>1 Then wScript.echo WScript.ScriptName & ” SERVERNAME” wScript.Quit Else s=args(0) End If Set objWMIService = GetObject(“winmgmts:{authenticationLevel=pktPrivacy}\\” & s […]

0

Enable Password Never Expires in Active Directory

September 10, 2010

Here’s a very simple script I wrote in VBScript to reset this flag if it doesn’t exist for all users in any given OU. [vb]Const ADS_UF_DONT_EXPIRE_PASSWD = &amp;H10000 Set objContainer = GetObject("LDAP://cn=Users,dc=domain,dc=local") objContainer.Filter = Array("user") For Each objUser In objContainer lngFlag = objUser.Get("userAccountControl") If (lngFlag And ADS_UF_DONT_EXPIRE_PASSWD)=0 Then lngFlag = lngFlag Xor ADS_UF_DONT_EXPIRE_PASSWD objUser.Put "userAccountControl", […]

0