I want to a list of users that is in the following OU:
Example.domain.se
… OU Systemaccounts <= here
…OU Active Directory
…OU Administrators <= here
The attributes I want to list for each user are: -SamAccountName -AccountType -enabledAccount -ExpirationDate -LockedOut -DisplayName -LastLogonDat -and which ou the user are listed in
Really appreciate your answer and all the guiding advice I can get.
Please, when you post code format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance.
If you just want enabled accounts you should filter for enabled accounts
Depending on your language setting you can set another delimiter for your CSV file so Excel would recognise it properly. Another option would be to use the great module from Doug Finke ImportExcel.
Thanks a lot.
Only one issue left, I also want to display only those user that´s have a certain description
As en example “descrition company123”
I tried a lot of combinations but without any success.
The starting code looks like this: