Hello All,
I have been trying to implement a powershell script that used at a different company to the domain at my current job.
The script is pretty simple. It is to search for users that are supposed to belong to a group and add them if they are missing.
I am using a filter to ensure that this only works on user accounts that are not disabled however this is where I ran into the problem in this domain. 90% of the user account do not come back with the "Enabled" property. When I investigated I also found that these account do not have any value for the userAccountControl attribute (missing in ADSI edit).
I was under the impression that this userAccountControl attribute cannot be missing or null.
If that is not the case how can I find disabled accounts that are missing the userAccountControl attribute.
Any help with this would be great! Thanks in advance.