Hi I am trying to get through powershell the Join Date for all our Azure AD only devices and if possible the account that joined the device?
Get-AzureADDevice and $_.DeviceTrustType do not hold this information.
Dsregcmd only holds registered date - I am hoping to get the actual AD Azure join date and account. Thanks
I tried to reproduce the same in my environment and got the below results:
I have one Azure AD joined device in my directory like below:
To know the device details like join date
and account
that performed this, you can check Audit Logs like below in Portal:
Mostly joined
date and registered
date will be same with seconds' gap.
To get the same details via PowerShell , you can execute below command like this:
Get-AzureADAuditDirectoryLogs | where-object Category -eq "Device" | select activityDisplayName,activityDateTime,InitiatedBy | ft
Response:
To get full
details of specific activity like Register device
, you can filter the command like below:
Get-AzureADAuditDirectoryLogs -Filter "activityDisplayName eq 'Register device' " | where-object Category -eq "Device" | fl
Response:
To get full
details of specific activity like Add device
, you can filter the command like below:
Get-AzureADAuditDirectoryLogs -Filter "activityDisplayName eq 'Add device' " | where-object Category -eq "Device" | fl
Response:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.