O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating Active Directory objects: step-by-step exercises

In these exercises, you will search for users in a specific OU that do not have a description attribute populated. You will create a script that updates this value. In addition, you will change the password for users in Active Directory.

Note

To complete these exercises, you will need access to a Windows server running AD DS. Modify the domain names listed in the exercises to match the name of your domain.

Using the Active Directory module to update Active Directory objects

  1. Open the Windows PowerShell ISE or some other script editor.

  2. Use the Import-Module cmdlet to import the Active Directory module.

    Import-Module ActiveDirectory
  3. Set the $users and $you variables to $null.

    $users = ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required