Friday, May 11, 2012

Setting Local Admin account to not expire

So I was using this command - 
net user username password /expires:never /passwordchg:no /comment:"Desktop Support" /add
- to create the local administrator account during OSD but the password was still set to expire.

I guess I misunderstood the /expires:never switch.  This sets the account to never expire not the password.

So in addition to the aforementioned net user command I added a wmic command that sets the password to never expire:

wmic path Win32_UserAccount WHERE Name="username" set PasswordExpires=False

2 comments:

  1. Thanks for your great tips. I have found the differences between password expiration and account expiration from this article.

    ReplyDelete

Remote Mailboxes - Hybrid Config - Missing

The Remote Mailbox exists on the On Prem Exchange server and linked to the Office 365 mailbox. Without one of these for each Office 365 mail...