Powershell Help Desk tasks

This script will help automating some help desk tasks. For example in my current environment we put user’s name in the “Description” field. When user calls in helpdesk for a support, we need to connect to their machine. In a huge network with dynamic IPs it’s hard to maintain the list of what computer this user is using. This when you can query AD to pull required information. This script will help with the following tasks:

– query AD to pull description field for given computer account
– query all computer accounts to get list of computer, which contain requested user name
– query domain controllers and pull last connection date to AD. It uses LastLogon date, which is not replicated across all Domein Controllers. You would have to query all DCs and get the most resent once. In my example I query only two, as those are the only one used.