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
- Gets or sets the LockoutDurationMinutes parameter.
- LockoutResetMinutes int
- Gets or sets the LockoutResetMinutes parameter.
- LockoutThreshold int
- Gets or sets the LockoutThreshold parameter.
- MaxPasswordAgeDays int
- Gets or sets the MaxPasswordAgeDays parameter.
- MinPasswordAgeDays int
- Gets or sets the MinPasswordAgeDays parameter.
- MinPasswordLength int
- Gets or sets the MinPasswordLength parameter.
- PasswordHistorySize int
- Gets or sets the PasswordHistorySize parameter.