Computer Names

This script get-computernames.ps1 uses .net and ldap to pull the computer names from an Active Directory domain. It does not require any special permissions since this information is available to all on the domain.

By default it returns all computers both Servers and Workstations that have checked into the domain within the last 60 days (you can change that if you want).
If you give it a flag either 'Server' or 'Workstation' it returns just that subset. These can be shortened to 's' and 'w'.

I use it most often to just get a list of computers and redirect the output to a text file.

ps> ./get-computernames.ps1 > computers.txt

This probably the script I have given most often to customers because they can't seem to find this information.