使用 Windows LAPS 事件日志

Windows 本地管理员密码解决方案 (Windows LAPS) 具有专用的事件日志通道。 所有 Windows LAPS 操作都通过丰富的事件进行跟踪。 了解关键事件以及如何查看日志。

查看事件日志

若要查看 Windows LAPS 事件日志通道,请在 Windows Server 事件查看器中,转到“应用程序和服务”>“日志”>“Microsoft”>“Windows”>“LAPS”>“操作”。

Screenshot of the event log and a Windows LAPS policy processing started event log message.

关键事件

请务必了解一些关键的 Windows LAPS 事件以及如何在事件日志中查看它们:

  • 策略处理开始和结束事件
  • 策略配置详细信息
  • 密码更新确认事件
  • 被阻止的外部密码修改请求
  • 身份验证后操作相关事件

策略处理周期开始和结束

当 Windows LAPS 开始后台策略处理周期时,在事件日志中跟踪操作的进度。 了解指示每个周期的开始和结束的特定事件,可以方便地读取事件日志和了解事件。

每个后台策略处理周期都从 10003 事件开始:

LAPS policy processing is now starting.

每个 10003 事件后跟几个描述发生情况的几个其他事件。 周期完成后,最终事件会将操作标记为成功或失败。

成功的周期由 10004 事件跟踪。 下面是 10004 事件的示例:

LAPS policy processing succeeded.

失败的周期由 10005 事件跟踪。 下面是 10005 事件的示例:

LAPS policy processing failed with the error code below.

Error code: 80070032

如果发生故障,可以使用错误代码进行故障排除。 还可以查看中间事件以获取详细信息。

策略配置详细信息

启用密码备份后,每个 Windows LAPS 后台策略处理周期期间都会发出策略配置事件。 该事件记录每个周期迭代的特定策略设置值。

将策略配置为将密码备份到 Windows Server Active Directory 时,将记录 10021 事件。 下面是 10021 事件的示例:

The current LAPS policy is configured as follows:

Policy source: GPO
Backup directory: Active Directory
Local administrator account name:
Password age in days: 30
Password complexity: 4
Password length: 14
Password expiration protection enabled: 1
Password encryption enabled: 1
Password encryption target principal: LapsAdministrators@contoso.com
Password encrypted history size: 12
Backup DSRM password on domain controllers: 0
Post authentication grace period (hours): 8
Post authentication actions: 1

将策略配置为将密码备份到 Microsoft Entra ID 时,将记录 10022 事件。 下面是 10022 事件的示例:

The current LAPS policy is configured as follows:

Policy source: CSP
Backup directory: Azure AD
Local administrator account name: ContosoLocalAdminAccount
Password age in days: 7
Password complexity: 4
Password length: 64
Post authentication grace period (hours): 8
Post authentication actions: 3

当 Windows LAPS 配置为使用旧版 Microsoft LAPS 策略时,将记录 10023 事件。 下面是 10023 事件的示例:

The current LAPS policy is configured as follows:

Policy source: Legacy LAPS
Backup directory: Active Directory
Local administrator account name:
Password age in days: 30
Password complexity: 4
Password length: 8
Password expiration protection enabled: 0

这些特定的策略设置值是示例,不应被视为建议。

密码更新确认事件

当 Windows LAPS 使用新密码成功更新配置的目录(Windows Server Active Directory 或 Microsoft Entra ID)时,将记录一个成功事件:10018 用于 Windows Server Active Directory 中的密码更新,10029 用于 Microsoft Entra ID 中的密码更新。

下面是 10018 事件的示例:

LAPS successfully updated Active Directory with the new password.

下面是 10029 事件的示例:

LAPS successfully updated Azure Active Directory with the new password.

使用新密码更新目录时,Windows LAPS 还会更新托管的本地帐户。 成功后会记录 10020 事件。

下面是 10020 事件的示例:

LAPS successfully updated the local admin account with the new password.

Account name: ContosoLocalAdminAccount
Account RID: 1087

被阻止的外部密码修改请求

启用 Windows LAPS 后,它会保护指定托管帐户的密码不被 Windows LAPS 以外的任何实体修改。 当试图更改密码被阻止时,将记录 10031 事件。

下面是 10031 事件的示例:

LAPS blocked an external request that tried to modify the password of the current managed account.

Account name: ContosoLocalAdminAccount
Account RID: 1087

身份验证后操作事件

配置身份验证后操作后,Windows LAPS 将监视指定的托管帐户是否成功进行身份验证。 检测到身份验证时,将记录 10041 事件。

下面是 10041 事件的示例:

LAPS detected a successful authentication for the currently managed account. A background task has been scheduled to execute the configured post-authentication actions after the configured grace period has expired.%n

Account name: ContosoLocalAdminAccount
Account RID: 1087
Password reset timer deadline: %3%n

到达 10041 事件中列出的截止时间时,Windows LAPS 会记录 10042 事件:

The post-authentication grace period has expired per policy. The configured post-authentication actions will now be executed.

Account name: ContosoLocalAdminAccount
Account RID: 1087

然后,Windows LAPS 会尝试轮换密码并执行任何指定的身份验证后操作。 密码轮换成功时,将记录 10044 事件。

下面是 10044 事件的示例:

LAPS successfully reset the password for the currently managed account and completed all configured post-authentication actions.%n
%n
Account name: ContosoLocalAdminAccount
Account RID: 1087

如果密码轮换失败,则会记录 10043 事件。 下面是 10043 事件的示例:

LAPS failed to reset the password for the currently managed account. The password is considered expired due to an authentication event. LAPS will continue retrying the password reset operation until it succeeds.

Account name: ContosoLocalAdminAccount
Account RID: 1087
Password reset retry count: 1
Error code: 80070032

客户端事件日志与 AD 域控制器事件日志

Windows LAPS 事件日志通道包含与充当客户端的本地计算机相关的事件。 Active Directory 域控制器上的 Windows LAPS 事件日志通道仅包含与管理本地 DSRM 帐户(如果启用)相关的事件,并且永远不会包含与已加入域的客户端行为相关的任何事件。

后续步骤