Some times we need to use programing to generate something more faster, especially if you handling more than 100 records of data.
This time i need to query user that are disabled in Active Directory. Sure you can see it by search in Active Directory control pane, but i need it to be exported in csv so i can handle it in excell format for futher processing.
So here are the script to know who is disabled in Active directory and save it to a csv file.
Const ADS_UF_ACCOUNTDISABLE = 2
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection...