Archive for April 18th, 2007

PowerShell for Active Directory Examples

Andrei published on a bunch of how-to’s to Active Directory management with PowerShell:

In these posts Andrei shares some of his tips and tricks for using free Active Directory cmdlets to manage your AD environment.

Among the scenarios he covers are:

  • Enumerating users, groups and other objects
    • List all users in my domain
    • List all users in a specific OU
    • Get help on Get-QADUser parameters
    • Get specific user properties
    • List first-level organizational units in your domain
    • List all users in my domain with their display name and city
    • Find all users in my domain that has City attribute starts with ‘ny’
  • Updating user properties
    • Set description for a specific user account:
    • Set city to Liverpool for all user accounts in the Demo OU
  • User creation
    • Create user accounts
  • Group operations
    • Create a new group
    • Add all users with a specific description to a group
    • List group members, display names and descriptions
  • Bulk creation
    • Export useraccounts to a CSV file
    • Import useraccounts from a CSV file
    • Import useraccounts from CSV file and add them to a specific group
  • Statistics:
    • Count users, groups, OUs
    • Count departments
    • Get statistics for departments, locations, etc.
    • Count mailboxes per each mailbox store (will work against Exchange 2000 and Exchange 2003)

Note that all of them are one-liners! Managing Active Directory from command line has never been so easy.

Technorati Tags: , , , ,



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

April 2007

%d bloggers like this: