大网数据广告活动
Windows排障命令

ksetup changepassword

· 52CE 我爱测

Reference article for the ksetup changepassword command, which uses the Key Distribution Center (KDC) password (kpasswd) value to change the password of the logged-on user.

Uses the Key Distribution Center (KDC) password (kpasswd) value to change the password of the logged-on user. The output of the command informs you of the success or failure status.

You can check whether the kpasswd is set, by running the ksetup /dumpstate command and viewing the output.

Syntax

ksetup /changepassword <oldpassword> <newpassword>

Parameters

Parameter Description
<oldpassword> Specifies the logged-on user's existing password.
<newpassword> Specifies the logged on user's new password. This password must meet all the password requirements set on this computer.
Remarks
  • If the user account isn't found in the current domain, the system will ask you to supply the domain name where the user account resides.

  • If you want to force a password change at next logon, this command allows the use of the asterisk (*) so the user will be prompted for a new password.

Examples

To change the password of a user who is currently logged on to this computer in this domain, type:

ksetup /changepassword Pas$w0rd Pa$$w0rd

To change the password of a user who is currently logged on in the Contoso domain, type:

ksetup /domain CONTOSO /changepassword Pas$w0rd Pa$$w0rd

To force the currently logged on user to change the password at the next logon, type:

ksetup /changepassword Pas$w0rd *

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/16/2017
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。