The command: "NET HELP ACCOUNTS" is on Windows 12, 11, 10, .. , MS Server 2025, 2022, 2019, .. available
Here is a simple example of using the
`NET ACCOUNTS` command in the Windows command line (
`cmd`):
Example: View network account information
NET ACCOUNTS
Result:
Account lock: Account lock is activated
Maximum password age: Unlimited
Password change required: 0 days
Minimum password length: 0 characters
Password must meet guidelines: Yes
Password reminders: 5 days
Late lock password length: 0 days
Lock password late: Unlimited
Description:
This example shows typical network account information. In this case, it displays information about password policies, such as account lockout activation, maximum password age, required password change frequency, and other security settings for user accounts on the local computer.
It is important to note that the information displayed may vary depending on the configurations and security policies on your system. The
`NET ACCOUNTS` command returns detailed information about the system's security policies and account settings.
The
`NET ACCOUNTS` command is used to set the policy settings on the local computer, such as: B. Account policies and password policies.
Example 1: Setting the maximum password age
The following command sets the maximum password age to 90 days:
net accounts /maxpwage 90
Description:
This command sets the maximum age of user passwords on the local computer to 90 days. This setting helps ensure security by forcing regular password updates.
Example 2: Force user to log out when account expires or valid login hours expire
The following command forces the user to log out when the account expires or valid login hours expire:
net accounts /forcelogoff 1
Description:
This command causes users to be logged out when their accounts expire or the specified login times have expired. This contributes to security by stopping unintentional or unauthorized login sessions.
Example 3: Setting the minimum password age
The following command sets the minimum password age to 60 days:
net accounts /minpwage 60
Description:
This command sets the minimum age of user passwords on the local computer to 60 days. This setting prevents users from changing their passwords too often, thereby promoting sustainable security practices.
Example 4: List of Account Policies
The following command lists all account policies on the local computer:
net accounts
Description:
This command displays a comprehensive list of the current account policies on the system, including password policies, lockout thresholds, and other relevant settings.
Example 5: Setting the maximum number of failed login attempts allowed
The following command sets the maximum number of failed login attempts allowed to 10:
net accounts /maxbadpw 10
Description:
This command limits the maximum number of failed login attempts allowed for user accounts on the local computer to 10. This setting improves security by making it more difficult for unauthorized access through repeated incorrect login attempts.
Example 6: Setting the minimum password length
The following command sets the minimum password length to 12 characters:
net accounts /minpwlen 12
Description:
This command is used to set the minimum length of user passwords on the local computer to 12 characters. Increasing the minimum length helps strengthen security by increasing the complexity of passwords.
More options
The
`NET ACCOUNTS` command provides a variety of other options that you can use to customize account policies to suit your needs. For more information about the options, see the command's documentation.