G$earch

Video: Three PowerShell scripts for managing users in Active Directory Domain Services

Posted by Harshad

Video: Three PowerShell scripts for managing users in Active Directory Domain Services


Video: Three PowerShell scripts for managing users in Active Directory Domain Services

Posted: 27 Jul 2010 07:56 AM PDT

Obtaining user object information via Active Directory Users And Computers is fine for the one-time use, but it falls short for batch tasks. During this episode of TR Dojo, I’ll share three scripts make it easy to pull user information from Active Directory via PowerShell.

Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.

For those who prefer text to video, you can click the Transcript link that appears below the video player window. And to make it easier for you to try out and modify the PowerShell scripts I discuss in the video, here is the text for each one:

Changing an attribute for a group of users

Get-ADUser -Filter * -SearchBase "OU=Accounting,OU=UserAccounts,DC=YourDomain,DC=com" | Set-ADUser -Manager "John Doe"

Copying one user’s group memberships to a second user

Get-ADPrincipalGroupMembership -Identity JohnDoe | % {Add-ADPrincipalGroupMembership -Identity JaneDoe -MemberOf $_}

Pulling a list of user accounts with passwords that don’t expire

Search-ADAccount -PasswordNeverExpires | FT Name, ObjectClass, UserPrincipalName

For more PowerShell tips and tricks, check out the following resources from TechRepublic and around the Web:

You can also sign up to receive the latest TR Dojo lessons through one or more of the following methods:



0 comments:

Post a Comment