concept script in category active directory

appears as: The script, script, script, scripts, scripts, The script, The scripts, A script
Learn Active Directory Management in a Month of Lunches

This is an excerpt from Manning's book Learn Active Directory Management in a Month of Lunches.

I’ve used names.csv as the filename. You can choose anything you want—just remember to modify the script. The file holds the FirstName, LastName, and the sam-AccountName fields you want to use. If you have a convention for samAccountName, you could get the script to create that value.

Use the scripts in listings 20.1 through 20.4 to test the availability of your domain controllers.

You can monitor disk space by regularly running a script that measures the available space and records the results. First, you need the data, which you can obtain through the following listing.

Listing 20.7. Monitoring disk space

The domain object is created and then the script iterates over the set of domain controllers . The Win32_Volume WMI class is used to obtain the disk information for the C:\ drive of each domain controller.

Other services can be added if you desire. You can, obviously, log on to each domain controller and manually inspect that the required services are running, but that’s a tedious activity, and you could be performing much more interesting tasks. Automate the test by using a script like the following listing.