< Back

Get-AadrmTrackingLog

Fri Jan 10, 2020 6:21 pm

NAME Get-AadrmTrackingLog



SYNOPSIS

Gets tracking information for protected documents.





SYNTAX

Get-AadrmTrackingLog [-FromTime <DateTime>] [-ToTime <DateTime>] -UserEmail <String> [<CommonParameters>]





DESCRIPTION

The Get-AadrmTrackingLog cmdlet returns tracking information about protected documents for a specified user who

protected documents (the Rights Management issuer) or who accessed protected documents. This cmdlet helps to

answer the question "Which protected documents did a specified user track or access?" Information returned

includes:



- The document content ID, with the document name if available



- The Rights Management issuer



- The users who accessed the document, when, and from what location



- What protection template ID or specific usage rights were used to protect the document and whether access was

granted or denied





You can specify a start time and stop time of entries to include. The output is returned as a list of Powershell

objects in the PowerShell console.

You can alternatively use the document tracking site to get the protection information about the tracked

documents. For more information, see the Tracking and revoling documents for users (https://docs.microsoft.com/info

rmation-protection/rms-client/client-admin-guide-document-tracking#tracking-and-revoking-documents-for-users)sectio

n in the admin guide.







PARAMETERS

-FromTime <DateTime>

Specifies the start time (inclusive) for the log file as a DateTime object. To obtain a DateTime object, use

the Get-Date (http://go.microsoft.com/fwlink/?LinkID=293966)cmdlet. Specify the date and time according to

your system locale settings. For more information, type `Get-Help Get-Date`.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ToTime <DateTime>

Specifies the stop time (inclusive) for the log file as a DateTime object. To obtain a DateTime object, use

the Get-Date cmdlet. Specify the date and time according to your system locale settings. For more information,

type `Get-Help Get-Date`.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UserEmail <String>

Specifies the email address of the user. The cmdlet gets the tracking information for documents that were

protected by or accessed by the user who has this email address.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









------ Example 1: Get all tracking information for a user ------



PS C:\\>Get-AadrmTrackingLog -UserEmail "test@contoso.com"



This command generates a log of all the tracking information for documents that were protected by or accessed by

the user with the email address "test@contoso.com".

Example 2: Get tracking information for a user, for a specific time period



PS C:\\>Get-AadrmTrackingLog -UserEmail "test@contoso.com" -FromTime "01/01/2018 00:00:00" -ToTime "01/31/2018

23:59:59"



This command is the same as the previous example except that the results are limited to documents that were

tracked within a specific time period by using the FromTime and ToTime parameters. In this example, the time

period is all days in January 2018, using the US date format.

Example 3: Get all tracking information for a user and save the results to a .csv file



PS C:\\>$trackingLogs = Get-AadrmTrackingLog -UserEmail "test@contoso.com"

PS C:\\>$trackingLogs | Export-Csv 'C:\\Temp\\TrackingLog.csv' -NoTypeInformation



The first command generates a log of all the tracking information for documents that were protected by or accessed

by the user with the email address "test@contoso.com", and saves the result in a variable.



The second command then uses the Export-Csv (https://docs.microsoft.com/en-us/powers ... .powershel

l.utility/export-csv?view=powershell-4.0)cmdlet to convert the tracking information into .csv format, and saves it

to the C:\\Temp\\TrackingLog.csv file.



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=869788

Get-AadrmTrackingLog

Get-Date http://go.microsoft.com/fwlink/?LinkID=293966

Export-Csv https://docs.microsoft.com/powershell/m ... rshell-4.0