The Get-PasswordFilterResult cmdlet allows you to programmatically test passwords against your password policy.
This cmdlet does not attempt to change the user's password, nor does it contact the domain controller. Use of this cmdlet requires that the group policy for the password filter is configured and applied to the computer you are running the cmdlet on. The password filter does not need to be configured to filter passwords on the local computer, but the policy needs to be in place.
EXAMPLES
Example 1
These examples show two password filter operations that are rejected for different reasons.
Example 2
Prompts for a password and username and then tests the password against the password filter.
PARAMETERS
-Fullname
The full display name of the user
-IsSetOperation
Specifies if the password should be tested as a set operation. By default it is tested as a change operation.
-Password
The password to test
-SecurePassword
A secure string representation of the password to test
-Username
The users account name
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.