API Reference
Command
Set-CxAccountPolicy
Sets local Account Policy (password/lockout) on SAM (local or remote).
Examples
Example 1
Set-CxAccountPolicy -MinPasswordLength 14 -MaxPasswordAgeDays 365 -PasswordHistorySize 24
Example 2
Set-CxAccountPolicy -ComputerName SERVER01 -LockoutThreshold 10 -LockoutDurationMinutes 30 -LockoutResetMinutes 30
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-CxAccountPolicy [-ComputerName <string>] [-LockoutDurationMinutes <int>] [-LockoutResetMinutes <int>] [-LockoutThreshold <int>] [-MaxPasswordAgeDays <int>] [-MinPasswordAgeDays <int>] [-MinPasswordLength <int>] [-PasswordHistorySize <int>] [<CommonParameters>]#Parameters
- ComputerName string
- Target computer(s). Use '.' for local computer or provide DNS names.
- LockoutDurationMinutes int
- Number of minutes an account remains locked out.
- LockoutResetMinutes int
- Number of minutes before the failed-logon counter resets.
- LockoutThreshold int
- Number of failed logon attempts that triggers account lockout.
- MaxPasswordAgeDays int
- Maximum number of days a password can be used before it expires.
- MinPasswordAgeDays int
- Minimum number of days a password must be kept before it can be changed.
- MinPasswordLength int
- Minimum password length to require.
- PasswordHistorySize int
- Number of prior passwords to remember and block from reuse.