Category filter
Troubleshoot password policy issues on Windows devices
With Hexnode UEM, IT admins can enforce password policy on Windows devices. However, the policy association might fail due to several device-specific reasons. This document provides insight into some troubleshooting measures which you can adopt to solve issues that might occur while associating a password policy on Windows devices via Hexnode UEM.
1. Password policy not getting associated with the device successfully and returns an error message stating ‘Invalid Payloads’.
Probable cause:
This can be caused if there are any password change restricted users on the device.
Solution:
Try executing the following script to check whether there is a password change restricted user on the device. You can use the Execute Custom Script action to execute a script.
1 2 3 4 |
$changePasswordRestrictedUsers = Get-LocalUser | Where-Object { $_.Enabled -eq $True -and $_.UserMayChangePassword -eq $False } Write-Host "Restricted user count: ", $changePasswordRestrictedUsers.count $microsoftAccounts = Get-LocalUser | Where-Object { $_.Enabled -eq $True -and $_.PrincipalSource -ne "Local" } Write-Host " Other users count: ", $microsoftAccounts.count |
If the code returns an output stating that restricted user accounts are present, then execute the following script. It removes the password change restriction of the users.
1 2 3 4 5 6 |
$changePasswordRestrictedUsers = Get-LocalUser | Where-Object { $_.Enabled -eq $True -and $_.UserMayChangePassword -eq $False } foreach ($user in $changePasswordRestrictedUsers) { $result = net user $user.Name "/PasswordChg:Yes" Write-Host "Password change restriction for user", $user.Name, "is removed." } |
2. Password policy fails to associate with the device and returns an error message displaying ‘password->MinDevicePasswordComplexCharacters->Command failed].’
Probable cause:
There are two possible cases where the password policy will be failed,
- The issue occurs when the device is connected to a Microsoft account and the password policy is applied.
- The password policy failure issue could also occur if the local account present on the device is converted from a Microsoft account.
Solution:
To resolve this issue, ensure the device is not associated with any Microsoft account or local account converted from a Microsoft account. Remove all such accounts before applying the password policy.