Shavlik: Get List of Machines from Active Directory Security Group

Version 5

    Name: Get List of Machines from Active Directory Security Group

    Description: This script queries Active Directory and retrieves a list of machines contained in a given security group.

    Author: Shavlik

    Licensing: Free

    Category: Group Policy

    Target Type: Console

    Script Version: 1.0.1.1

    Prerequisites: Windows Server 2008 R2 or Windows 7

    Modifies the target machine: No

    Minimum ITScripts engine version required: 8.0.0.0

    Inputs: The name of the Active Directory (AD) security group, the output file name and location, and the AD server name (optional)

    Outputs: Writes a list of computer names from the security group to a text file.

     

    Possible Operations Monitor results include:

    "WMI connection to the target machine failed. Access is denied."

    "WMI connection to the target machine failed. The machine may be offline or firewalled."

    "gpoName is required. Please provide a gpoName."

    "fileOutputLocation is required. Please provide a fileOutputLocation."

    "fileOutputLocation (<file location>) is either an invalid path or the file name extension is not a.txt file. Please enter a valid file path. (example: C:somedirectoryoutputfilename.txt)"

    "You cannot save the output file to C:Windows or its subfolders. Please enter a valid file path. (example: "C:somedirectoryoutputfilename.txt")"

    "<AD Server> is not a string input"

    "A problem occured querying active directory. Error message: <error details>"

    "No results were found. Error message: <error details>"

    "No computer objects found under <gpoName>."

    "Success: <filelocation> has been created."

    "Success: <filelocation> has been updated."