Get-​Aadrm​Usage​Log

Downloads Rights Management logs to local storage.

Syntax

Get-AadrmUsageLog
   [-FromCounter <Int32>]
   -Path <String>
   [-ToCounter <Int32>]
   [<CommonParameters>]

Description

The Get-AadrmUsageLog cmdlet downloads Azure Rights Management usage logs to local storage.

You must use PowerShell to get these logs; you cannot do this action by using a management portal.

Note: This cmdlet should be used only if you have usage logs prior to the usage logging change in February 2016. After this date, the only Windows PowerShell cmdlet that you need for Azure RMS usage logging is Get-AadrmUserLog.

For more information about usage logging, see Logging and analyzing usage of the Azure Rights Management service.

Examples

Example 1: Get all logs

PS C:\>Get-AadrmUsageLog -Path "E:\Logs\UsageLog.log"

This command saves all usage logs to the E:\Logs\UsageLog.log file.

Example 2: Get a range of logs

PS C:\>Get-AadrmUsageLog -Path "E:\Logs\UsageLogRange.log " -FromCounter 1024 -ToCounter 2047

This command saves the specified range of usage logs to the E:\Logs\UsageLogRange.log file.

Required Parameters

-Path

Specifies a path for the log.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-FromCounter

Specifies a counter value. The cmdlet gets entries as far back as this counter value. To obtain a counter value, use the Get-AadrmUsageLogLastCounterValue cmdlet.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-ToCounter

Specifies a counter value.The cmdlet gets entries as far forward as this counter value.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False