Hi,
The EmailAddress, LastLogonDate and Created are extended properties retrieved by the Get-ADUser cmdlet. If you want to retrieve these properties you can use the Properties parameter to specify them.
Get-ADGroupMember -Identity $group | ForEach-Object {
Get-ADUser -Identity $_.SamAccountName -Properties EmailAddress, LastLogonDate, Created |
Select-Object -Property Name, GivenName, Surname, UserPrincipalName, EmailAddress, Enabled, LastLogonDate, Created
}
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.