你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Export-DebugLogs

Gathers and exports Microsoft Purview Information Protection client and scanner log files to a compressed file.

语法

Default (默认值)

Export-DebugLogs
    [-FileName] <String>
    [-OnBehalfOf <PSCredential>]
    [<CommonParameters>]

说明

The Export-DebugLogs cmdlet gathers all client and scanner log files from %localappdata%\Microsoft\MSIP\Logs and saves them to a single, compressed file that has a .zip format. This file can then be sent to Microsoft Support if you are requested to send log files to help investigate a reported issue with the Microsoft Purview Information Protection client or scanner from this client.

Use the OnBehalfOf parameter if you need to export log files from a service account. For example, an account that has been created to run non-interactively, such as the account for the MicrosoftPurview Information Protection scanner.

示例

Example 1

PS C:\> Export-DebugLogs -FileName C:\Logs\AIPLogs.zip

This command gathers and saves all exported logs to the AIPLogs.zip file in the existing C:\Logs folder.

参数

-FileName

The path and file name for the exported log files.

The path can be local or a network path (mapped drive letter or UNC).

Any folders in the path must already exist. If you specify a file name that already exists in the specified folder, the original file is overwritten.

When you specify the file name, include the .zip file name extension.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OnBehalfOf

To use this parameter, you must run your PowerShell session with the Run as Administrator option.

Specifies the variable that includes the credentials object to use when you need to export log files from an account other than the account you are currently signed in with. For example, you need to collect log files for the service account that runs the Microsoft Purview Information Protection scanner. In this scenario, if the scanner is installed on the same computer as you're running this cmdlet, the log files also include some information from the scanner's configuration database.

Use the Get-Credentials cmdlet to create the variable that stores the credentials.

参数属性

类型:PSCredential
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值: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.

输入

None

输出

System.Object