We’ve been blogging so much about using PowerShell to manage AD users and groups so it’s probably the right time now to check-out PowerShell usage to do the same for local Windows (workstation or server) accounts management.
Luckily, learning that is very straight-forward.
Quoting from his description:
This pack allows you to enumerate local users and groups as well as execute some actions against users. Along with the local users, you’ll be able to see the last login time, password age, and the number of bad password attempts. As well, you’ll be able to:
- view the password/account policies for users -change a users password
- force a user to change their password next time they login
- add/remove users to a group
- enable/disable users
As usual with PowerGUI, all these actions generate PowerShell code on the “PowerShell Code” tab so once you’ve done all that in UI, click the tab and copy-paste the code into your scripts or command prompt.
This should work for Windows XP, 2003, Vista and 2008 (aka Longhorn.)
To use the pack:
- download and install PowerGUI,
- download the
localuserandgroups.snapinfile attached to the library post, and
- import the file into the PowerGUI tree.