< Back
Get-AadrmAdminLog
Post
NAME Get-AadrmAdminLog
SYNOPSIS
Generates logs for all Rights Management administrative commands.
SYNTAX
Get-AadrmAdminLog [-Force] [-FromTime <DateTime>] -Path <String> [-ToTime <DateTime>] [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Get-AadrmAdminLog cmdlet generates logs for all Rights Management administrative commands. You can specify a
start time and stop time of entries to include.
You must use PowerShell to get these admin logs; you cannot do this action by using a management portal.
PARAMETERS
-Force [<SwitchParameter>]
Indicates that the cmdlet overwrites, without prompting for confirmation, an existing log file that has the
same path.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-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
-Path <String>
Specifies an existing path for the log.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
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: Generate a log of all commands ----------
PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log"
This command generates a log that contains all the Rights Management administrative commands that have been run
for your organization's Azure Rights Management service.
Example 2: Generate a log of commands for a specified time period
PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log" -FromTime "05/01/2015 00:00:00" -ToTime "05/31/2015 23:59:59"
This command generates a log of administrative commands for your Azure RMS tenant, limited to items that fall
within the specific time period by using the FromTime and ToTime parameters. In this example, the time period is
all days in May 2015, using the US date format.
-- Example 3: Generate a log of commands for the last 45 days --
PS C:\\>$days = (Get-Date).AddDays(-45) PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log" -FromTime $days
This command generates a log of administrative commands for your Azure RMS tenant, limited to items within the
last 45 days (inclusive). The first command sets the variable for the FromTime parameter to be today's date minus
45 days. Then the second command gets the entries from the log for this time period, by using this variable.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=400607
Get-Date http://go.microsoft.com/fwlink/?LinkID=293966
SYNOPSIS
Generates logs for all Rights Management administrative commands.
SYNTAX
Get-AadrmAdminLog [-Force] [-FromTime <DateTime>] -Path <String> [-ToTime <DateTime>] [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Get-AadrmAdminLog cmdlet generates logs for all Rights Management administrative commands. You can specify a
start time and stop time of entries to include.
You must use PowerShell to get these admin logs; you cannot do this action by using a management portal.
PARAMETERS
-Force [<SwitchParameter>]
Indicates that the cmdlet overwrites, without prompting for confirmation, an existing log file that has the
same path.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-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
-Path <String>
Specifies an existing path for the log.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
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: Generate a log of all commands ----------
PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log"
This command generates a log that contains all the Rights Management administrative commands that have been run
for your organization's Azure Rights Management service.
Example 2: Generate a log of commands for a specified time period
PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log" -FromTime "05/01/2015 00:00:00" -ToTime "05/31/2015 23:59:59"
This command generates a log of administrative commands for your Azure RMS tenant, limited to items that fall
within the specific time period by using the FromTime and ToTime parameters. In this example, the time period is
all days in May 2015, using the US date format.
-- Example 3: Generate a log of commands for the last 45 days --
PS C:\\>$days = (Get-Date).AddDays(-45) PS C:\\>Get-AadrmAdminLog -Path "C:\\Temp\\AdminLog.log" -FromTime $days
This command generates a log of administrative commands for your Azure RMS tenant, limited to items within the
last 45 days (inclusive). The first command sets the variable for the FromTime parameter to be today's date minus
45 days. Then the second command gets the entries from the log for this time period, by using this variable.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=400607
Get-Date http://go.microsoft.com/fwlink/?LinkID=293966