Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ExpDaysMax = CInt(InputBox("Enter amount of days:","Find expire passwords",""))
- dim targetGroups(4)
- targetGroups(0) = "Account Managers"
- targetGroups(1) = "Resource Managers"
- targetGroups(2) = "General Admins"
- targetGroups(3) = "Help Desk"
- For Each objGroup in targetGroups
- Set group = GetObject("WinNT://bsit/" & CStr(objGroup))
- For Each user in group.Members
- ExpDays = CInt(user.PasswordExpirationDate - Now() - 1)
- If ExpDays < ExpDaysMax Then
- Wscript.Echo("Password for user " & user.Name & " will expire soon. " & ExpDays & " days left.")
- End If
- Next
- Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement