@@ -50,7 +50,7 @@ To get audit log events for up to seven days for your Windows 365 tenant, follow
50502 . Verify the installation by running this command:``` Get-InstalledModule Microsoft.Graph ```
51513 . To get all Cloud PC Graph endpoints, run this command: ``` Get-Command -Module Microsoft.Graph* *virtualEndpoint* ```
5252
53- ### Sign in as test user
53+ ### Sign in
5454
55551 . Run either of these two commands:
5656 - ``` Connect-MgGraph -Scopes "CloudPC.ReadWrite.All" ```
@@ -62,9 +62,15 @@ To get audit log events for up to seven days for your Windows 365 tenant, follow
6262
6363You can view audit data in multiple ways.
6464
65- #### List audit events
65+ #### Get entire list of audit events, including the audit actor
6666
67- To see a list of audit events, use the following command:
67+ To get the entire list of audit events including the actor (person who performed the action), use the following command:
68+
69+ ``` Get-MgDeviceManagementVirtualEndpointAuditEvent | Select-Object -Property Actor,ActivityDateTime,ActivityType,ActivityResult -ExpandProperty Actor | Format-Table UserId, UserPrincipalName, ActivityType, ActivityDateTime, ActivityResult ```
70+
71+ #### Get a list of audit events
72+
73+ To get a list of audit events without the audit actor, use the following command:
6874
6975``` Get-MgDeviceManagementVirtualEndpointAuditEvent ```
7076
@@ -74,14 +80,7 @@ To get only the top N events, use the following parameters: ```Get-MgDeviceManag
7480
7581#### Get a single event by event ID
7682
77- You can use the following command to a single event: ``` Get-MgDeviceManagementVirtualEndpointAuditEvent -CloudPcAuditEventId {event ID} ```
78-
79- #### Get audit actor
80-
81- You can also find out who performed an audit event by running the following commands:
82-
83- ``` $res=Get-MgDeviceManagementVirtualEndpointAuditEvent -CloudPcAuditEventId {event ID} ``` dotnetcli
84- ``` $res.Actor ```
83+ You can use the following command to get a single audit event, where you will need to provide the {event ID}: ``` Get-MgDeviceManagementVirtualEndpointAuditEvent -CloudPcAuditEventId {event ID} ```
8584
8685<!-- ########################## -->
8786## Next steps
0 commit comments