< Back

Get-AadrmUsageLog

Fri Jan 10, 2020 6:22 pm

NAME Get-AadrmUsageLog



SYNOPSIS

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

(https://docs.microsoft.com/information- ... lyze-usage).





PARAMETERS

-FromCounter <Int32>

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.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Path <String>

Specifies a path for the log.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-ToCounter <Int32>

Specifies a counter value.



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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

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 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.



RELATED LINKS

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

Get-AadrmUsageLogLastCounterValue

Logging and analyzing usage of the Azure Rights Management service

https://docs.microsoft.com/information- ... lyze-usage