If you want to export information of the active directory user from PowerShell then check the script below. To run this script you need to do a few tasks. To fetch the information we are using the command called get-aduser.
If you want to fetch information of the single-user then use this command.
You can select the specific object what you want to retrieve for that particular user, check the example below
If you want to fetch the information for lots of users by using there NTID's or their email address then write all the NTID's inside a notepad and use that notepad to fetch the data as shown below in the script. For this script, we used NTID's or you can say SamAccountName. To run this script open PowerShell as an administrator and run the script.
If you want to copy the script then pick it from here and modify changes accordingly.
Please use backlash, our editor is giving problem when ever we write backlash. so we used "-" over here C:Users-Downloads-NTIDs.txt