TestimoX

API Reference

Command

Set-CxAccountPolicy

Namespace ComputerX.PowerShell
Inputs
System.String

Sets local Account Policy (password/lockout) on SAM (local or remote).

Examples

Authored help example

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 optionalposition: 0pipeline: true (ByPropertyName)
Target computer(s). Use '.' for local computer or provide DNS names.
LockoutDurationMinutes int optionalposition: namedpipeline: false
Number of minutes an account remains locked out.
LockoutResetMinutes int optionalposition: namedpipeline: false
Number of minutes before the failed-logon counter resets.
LockoutThreshold int optionalposition: namedpipeline: false
Number of failed logon attempts that triggers account lockout.
MaxPasswordAgeDays int optionalposition: namedpipeline: false
Maximum number of days a password can be used before it expires.
MinPasswordAgeDays int optionalposition: namedpipeline: false
Minimum number of days a password must be kept before it can be changed.
MinPasswordLength int optionalposition: namedpipeline: false
Minimum password length to require.
PasswordHistorySize int optionalposition: namedpipeline: false
Number of prior passwords to remember and block from reuse.