Archive for May 28th, 2007

Manage Local Users and Groups with PowerShell

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.

Rob “Deuce” Doucette published a PowerPack for Local Users And Groups management with PowerShell to the PowerGUI library.

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:

  1. download and install PowerGUI,
  2. download the localuserandgroups.snapin file attached to the library post, and
  3. import the file into the PowerGUI tree.

Tags: , , , , , , ,

Advertisements

My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

May 2007
M T W T F S S
« Apr   Jun »
 123456
78910111213
14151617181920
21222324252627
28293031  

%d bloggers like this: