Get-AipServiceAdminLog
Generates logs for all protection commands for Azure Information Protection.
Sintassi
Default (impostazione predefinita).
Get-AipServiceAdminLog
-Path <String>
[-FromTime <DateTime>]
[-ToTime <DateTime>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Descrizione
The Get-AipServiceAdminLog cmdlet generates logs for all administrative protection commands for Azure Information Protection. 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.
Esempio
Example 1: Generate a log of all commands
PS C:\>Get-AipServiceAdminLog -Path "C:\Temp\AdminLog.log"
This command generates a log that contains all the administrative protection commands that have been run for your tenant.
Example 2: Generate a log of commands for a specified time period
PS C:\>Get-AipServiceAdminLog -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 protection commands that have been run for your 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-AipServiceAdminLog -Path "C:\Temp\AdminLog.log" -FromTime $days
This command generates a log of administrative protection commands for your 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.
Parametri
-Confirm
Prompts you for confirmation before running the cmdlet.
Proprietà dei parametri
Tipo: | SwitchParameter |
Valore predefinito: | False |
Supporta i caratteri jolly: | False |
DontShow: | False |
Alias: | cf |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
-Force
Indicates that the cmdlet overwrites, without prompting for confirmation, an existing log file that has the same path.
Proprietà dei parametri
Tipo: | SwitchParameter |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
-FromTime
Specifies the start 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
.
Proprietà dei parametri
Tipo: | DateTime |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
-Path
Specifies an existing path and a file name for the log.
Proprietà dei parametri
Tipo: | String |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | True |
Valore dalla pipeline: | True |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
-ToTime
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
.
Proprietà dei parametri
Tipo: | DateTime |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Proprietà dei parametri
Tipo: | SwitchParameter |
Valore predefinito: | False |
Supporta i caratteri jolly: | False |
DontShow: | False |
Alias: | wi |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.