Hey everyone! With WMIC being phased out, I'm looking for a way to disable password expiration for all local accounts on my computer. I was previously using the command "wmic UserAccount set PasswordExpires=False" through CMD to do this remotely. Does anyone know an alternative command I can use in PowerShell to achieve the same result?
2 Answers
You can use PowerShell to handle this by utilizing the `Get-LocalUser` cmdlet and piping it to `Set-LocalUser`. This way, you can disable password expiration for all local users efficiently.
Have you considered using the command `Set-LocalUser -Name "username" -PasswordNeverExpires $true`? Just keep in mind that this one is specific to a certain username. If you're looking for a way that applies to all accounts at once, you might want to tweak it a bit.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures