Category Filter

Script to change password of a user account on Windows 10 devices

Users forgetting their device password is a common scenario for an IT admin. Hexnode lets admins to change the password of users by deploying scripts.


The Sample Scripts provided below are adapted from third-party Open-Source sites.

.bat format

E.g., To edit the password of the user, Josh to abc_123,

Net user josh abc_123

.ps1 format

E.g., To edit the password of user, Josh to abc_123,

$NewPassword = ConvertTo-SecureString "abc_123" -AsPlainText –Force
Set-LocalUser -Name Josh -Password $NewPassword


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.