Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Console App for enumerating userAccountControl integer values
Imports ActiveDs
Module Module1
Sub Main()
Dim UACValue1 As Long
Dim UACValue2 As Long
Dim UACValue3 As Long
UACValue1 = ADS_USER_FLAG.ADS_UF_NORMAL_ACCOUNT Or ADS_USER_FLAG.ADS_UF_DONT_EXPIRE_PASSWD And (Not ADS_USER_FLAG.ADS_UF_ACCOUNTDISABLE)
UACValue2 = ADS_USER_FLAG.ADS_UF_NORMAL_ACCOUNT Or ADS_USER_FLAG.ADS_UF_PASSWD_CANT_CHANGE Or ADS_USER_FLAG.ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION
UACValue3 = ADS_USER_FLAG.ADS_UF_NORMAL_ACCOUNT Or ADS_USER_FLAG.ADS_UF_SMARTCARD_REQUIRED Or ADS_USER_FLAG.ADS_UF_TRUSTED_FOR_DELEGATION
Console.WriteLine(UACValue1 & " " & UACValue2 & " " & UACValue3)
Console.ReadLine()
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.