Edit

Share via


Get-LapsDiagnostics

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

Syntax

Default (Default)

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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputFolder

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Inputs

None

Outputs

Object