No problem. The reason for that, is if it did read all properties by default it could get quite messy. As there are ~60 properties (more if you have extend schema for different things)
Christopher Catlett Consultant | Detroit [MCTS_2013_small] Sogeti USA Office 248-876-9738 |Fax 877.406.9647 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 www.us.sogeti.com<http://www.us.sogeti.com/> From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Heaton, Joseph@Wildlife Sent: Wednesday, December 04, 2013 3:14 PM To: 'powershell@lists.myitforum.com' Subject: RE: [powershell] thought this would be simple That did it, thanks :) Joe Heaton Enterprise Server Support CA Department of Fish and Wildlife 1807 13th Street, Suite 201 Sacramento, CA 95811 Desk: (916) 323-1284 From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of christopher.catl...@us.sogeti.com<mailto:christopher.catl...@us.sogeti.com> Sent: Wednesday, December 04, 2013 12:01 PM To: powershell@lists.myitforum.com<mailto:powershell@lists.myitforum.com> Subject: RE: [powershell] thought this would be simple Get-ADUser -Filter * -Searchbase "top OU that I want to search from" -Searchscope Subtree -Properties Surname,GivenName,Mail | select Surname,GivenName,Mail | export-csv c:\location -NoTypeInformation Christopher Catlett Consultant | Detroit [MCTS_2013_small] Sogeti USA Office 248-876-9738 |Fax 877.406.9647 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 www.us.sogeti.com<http://www.us.sogeti.com/> From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Trevor Sullivan Sent: Wednesday, December 04, 2013 2:50 PM To: powershell@lists.myitforum.com<mailto:powershell@lists.myitforum.com> Subject: RE: [powershell] thought this would be simple Joe, Not all Active Directory object attributes are returned by default. You will need to use the -Properties parameter on Get-ADUser to specify which Active Directory attributes you want to include in the result. Cheers, Trevor Sullivan From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Heaton, Joseph@Wildlife Sent: Wednesday, December 4, 2013 1:44 PM To: powershell@lists.myITforum.com<mailto:powershell@lists.myITforum.com> Subject: [powershell] thought this would be simple I need to create a simple, 3 column csv: Last Name, First Name, e-mail address Note: We are not running Exchange in-house anymore, so I can't get this through Exchange shell, which would be much, much simpler. I have to get the info directly from Active Directory. I've run the following command: Get-ADUser -Filter * -Searchbase "top OU that I want to search from" -Searchscope Subtree | select Surname,GivenName,Mail | export-csv c:\location -NoTypeInformation That only gives me the first and last name, not the Mail attribute. So, I removed the select section, and just had it output everything to the csv. There's no mail attribute, and there's only 10 attributes showing. How can I get to the mail attribute? Thanks, Joe Heaton Enterprise Server Support CA Department of Fish and Wildlife 1807 13th Street, Suite 201 Sacramento, CA 95811 Desk: (916) 323-1284 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1
<<inline: image001.jpg>>