Skip to main content

Windows: Set Password Never Expire


Create user yaadmin and set password never expire.
net user yaadmin /FullName:"Yet Another Administrator" Passwd12 /add
wmic useraccount where "Name='yaadmin'" set PasswordExpires=FALSE

When creating new user interactively, it is just a good practice to replace password with * , and then type in password 2 times.

net user yaadmin /FullName:"Yet Another Administrator" * /add
Type a password for the user:
Retype the password to confirm:
add new user with net user command

Set Administrator's password never expired:

wmic useraccount where Name='Administrator' set PasswordExpires=FALSE

Popular posts from this blog

Data Recovery Softwares

Follow 3-2-1 backup rule so you do not need these data recovery softwares.

Linux command: printenv

printenv - print all or part of environment NAME        printenv - print all or part of environment SYNOPSIS        printenv [OPTION]... [VARIABLE]... DESCRIPTION        Print  the  values  of the specified environment VARIABLE(s).  If no VARIABLE is speci‐        fied, print name and value pairs for them all.        -0, --null               end each output line with NUL, not newline        --help display this help and exit        --version               output version information and exit        NOTE: your shell may have its own version of printenv,  which  usually  supersedes  the        version  described  here.  Please refer to your shell's documentation for d...

Powershell: Get-Content - tail command on Windows

Love tail command on Linux ? Try Get-Content with Powershell 3.0+.