Angeal
asked on
Powershell: Export active users' firstname, lastname & email address to CSV
If possible, can someone please provide a Powershell script that will export active users' first name, last name and email address to a csv file?
We are running our Domain controllers on Server 2003 and please no 3rd party cmdlets if possible.
Thanks in advance,
A.
We are running our Domain controllers on Server 2003 and please no 3rd party cmdlets if possible.
Thanks in advance,
A.
ASKER
Awesome! Thanks footech, and for responding so quickly!
ActiveDirectory module requires the 2008R2 AD Web Services. That is the reason the Quest AD modules are there - and they should be used, as they make life easier. With those, it is similar to above:
Get-QADUser | select FirstName, LastName, email | Export-Csv -NoType C:\temp\users.csv
Qlemo is right. I'm getting so used to having 2008R2 domain controllers that I don't think about it anymore. Sorry for the misinformation. You would need at least one DC running 2008R2 (or higher) to use the Microsoft AD cmdlets. Feel free to request attention to this question to re-open and assign points appropriately.
ASKER
Hi Qlemo,
Please re-open the question.
We don't have ADWS and currently don't have a W2008R2 DC.
How do I implement Quest? Does something need to be installed on one of the DC's to use Quest cmdlets? I'm fairly new to using Powershell.
Thanks to you both,
A.
Please re-open the question.
We don't have ADWS and currently don't have a W2008R2 DC.
How do I implement Quest? Does something need to be installed on one of the DC's to use Quest cmdlets? I'm fairly new to using Powershell.
Thanks to you both,
A.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Quest is a free PowerShell module you have to import on the machine you are using for running the PS script. Download at http://www.quest.com/powershell/activeroles-server.aspx .
One way to get the Snap-In loaded (after having installed it) is by issueing
Add-PSSnapin Quest.ActiveRoles.ADManage ment
in your PS session.
One way to get the Snap-In loaded (after having installed it) is by issueing
Add-PSSnapin Quest.ActiveRoles.ADManage
in your PS session.
ASKER
Qlemo,
So nothing needs to be installed on the actual DC? Interesting. I'm definitely going to look into Quest if that's the case.
Footech,
Your non-Powershell option did the trick. Just what I needed.
So nothing needs to be installed on the actual DC? Interesting. I'm definitely going to look into Quest if that's the case.
Footech,
Your non-Powershell option did the trick. Just what I needed.
Open in new window