I use PowerShell with Quest AD cmdlets.
I can use the Get-QADGroupMember cmdlet to get a list of everyone in this group. So far so good, but I would like to get their email alias. All that is being returned at present is something like:
Name Type DN
---- ---- --
Jane Doe User CN=Jane Doe,OU=Employee,DC=companyname,DC=com
Job Blow User CN=Joe Blow,OU=Employee,DC=companyname,DC=com
I tried using get-qaduser with the -includeallproperties flag, but I still only get the above fields and don’t know how to get the returned data, which, according to the documentation, is cached on the computer.
Any help would be appreciated.
UPDATE
I ended up using "select" as shown below:
$everyone = Get-QADGroupMember "All employees" | select firstname, lastname, email
, , -. , , , :
for ($i=0; $i -le $everyone .length-1; $i++)
{
write-host $everyone[$i].email
}
, "." -. , , , . , , - - !