編輯

共用方式為


Get-LapsDiagnostics

Collects Windows Local Administrator Password Solution (LAPS) logs and tracing from the local machine.

Syntax

Get-LapsDiagnostics
   [[-OutputFolder] <String>]
   [-CollectNetworkTrace]
   [-ResetPassword]
   [<CommonParameters>]

Description

The Get-LapsDiagnostics cmdlet collects LAPS logs and tracing from the local machine, and copies them into a .zip file. This cmdlet is primarily intended for support and testing scenarios but of course may be used at any time. The name of the resultant .zip file includes the machine name and current timestamp, and by default is written under the $env:TEMP\LapsDiagnostics folder. The output folder may be customized using the OutputFolder.

Examples

Example 1

Get-LapsDiagnostics

Get-LapsDiagnostics: all data for this run was written to the following zip file:

C:\Users\ADMINI~1\AppData\Local\Temp\LapsDiagnostics\LapsDiagnostics_LAPSCLIENT_2023041004_072649.zip

This example demonstrates basic collection of LAPS diagnostic info using all default parameters.

Example 2

Get-LapsDiagnostics -OutputFolder c:\LapsDiagFolder

Get-LapsDiagnostics: all data for this run was written to the following zip file:

c:\LapsDiagFolder\LapsDiagnostics_LAPSCLIENT_2023041004_072702.zip

This example demonstrates basic collection of LAPS diagnostic info to a specific output folder.

Example 3

Get-LapsDiagnostics -OutputFolder c:\LapsDiagFolder -ResetPassword

Get-LapsDiagnostics: all data for this run was written to the following zip file:

c:\LapsDiagFolder\LapsDiagnostics_LAPSCLIENT_2023041004_072709.zip

This example demonstrates basic collection of LAPS diagnostic info across a forced password reset operation to a specific output folder.

Example 4

Get-LapsDiagnostics -CollectNetworkTrace

Get-LapsDiagnostics: all data for this run was written to the following zip file:

C:\Users\ADMINI~1\AppData\Local\Temp\LapsDiagnostics\LapsDiagnostics_LAPSCLIENT_2023041004_072719.zip

This example demonstrates basic collection of LAPS diagnostic info while also collecting network tracing.

Parameters

-CollectNetworkTrace

Specifies that network tracing should also be collected and included in the resultant .zip file.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OutputFolder

Specifies that the resultant .zip file should be placed under the specified folder.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResetPassword

Specifies that logs and tracing should be collected across a forced password reset for the currently managed local account. In this mode the cmdlet collects tracing across a call to the Reset-LapsPassword cmdlet.

If this parameter isn't specified, the cmdlet collects tracing across a call to the Invoke-LapsProcessingCycle cmdlet.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object