How to Get a List of Users from AD to Compare against Users in Lawson
This process is going to assume you already know how to build a Lawson CSV report of users to compare against. LSA Report Maintenance has these report options available for this.
- Login into your windows machine and open Powershell as an Administrator.
- Type in this command: Get-ADUser -Filter * -SearchBase “dc=domain,dc=local” | select Name,SID | Export-CSV
- dc=domain,dc=local will need to be updated to match your organizations.
- select Name,SID will extract the users Name in AD (typically First and Last Name) and their Security ID.
- Since we are doing this to compare against Lawson users (assuming you’re using SSOP), you want to also include the sAMAccountName, this is login name the users use to login into their windows machine.
- Export-CSV Requires a path after it including filename,
- example: Export-CSV C:\ExportDirectory\ADUserList.csv
- For example, if you only wanted the Name and sAMAccountName use the command below:
- If you only want Name and SID use the command below:
- Get-ADUser -Filter * -SearchBase “dc=Yourdomain,dc=Yourlocal” | select Name,SID | Export-CSV C:\ExportDirectory\ADUserList.csv
You should now be able to acquire the CSV file in your C:\ExportDirectory\ that you outputted to.
Good luck!