billybarty
Technical User
I have been looking in dsquery commands to try to find how to output a list of accounts that are set to never expire but I can't find the correct command. Is this possible with dsquery and if so what is the command?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Set objUser = GetObject("LDAP://CN=myerken,OU=management,DC=fabrikam,DC=com")
intUserAccountControl = objUser.Get("userAccountControl")
If intUserAccountControl And ADS_UF_DONT_EXPIRE_PASSWD Then
WScript.Echo "The password does not expire."
WScript.Quit
Else
WScript.Echo "The password expires."
End If