Hi All
I am trying to use the following code to total enabled users BUT no include the hidden accounts. I have tried using the SamAccountName, SamAccountType, Name and nothing seems to be working for me. I am running ISE as Administrator with a high priviledge account. Please help :)
get-aduser -filter * -Properties * | where { $_.sAMAccountType -ne "805306370"} | select enabled, SamAccountName, manager, whencreated | export-csv C:\test.csv