As an Administrator, I have been asked more than once to find out where a computer is on the network. This question is usually asked by someone that needs to inventory or lifecycle the equipment. If your IT department is well organized or you have some sort of 3rd party
Today we’re talking a little more about Active Directory reconnaissance, for lack of a better term. If I start a new job, the first thing I want to do is find out how my infrastructure is configured. This script will search through Active Directory, or a subset of Active Directory,
More Active Directory PowerShell goodness… this time, creating Active Directory User objects in bulk using a CSV file. You will see 2 different code blocks below. The first, is as simple as you can get using minimal parameters and code. The second code block includes more parameters and addresses the
Update 4 May 2017: I’ve been contacted by a few people that were having trouble running the code in the Get-GroupMember function. I have replicated the error on one of my DCs but another DC in a different domain the Get-GroupMember function works fine. I’m still not entirely sure why the
This script uses the win32_LogicalDisk WMI Class to get Local Disk Information for one or multiple computers. For more information on the DriveTypes available with the Win32_LogicalDisk class visit: https://technet.microsoft.com/en-us/library/ee176674.aspx. You could also expand on this script and add email capability and schedule it as a job or a scheduled task.
This script will search a file structure for a specific file type and export the results to a CSV file. This can be used to search a user accessible file share for file types that you may have policies against storing on a file share. If you don’t have access
In this video, I talk a little more about performing Active Directory Maintenance with PowerShell. Specifically, finding user objects that have not authenticated to the domain in X number of days. This script will search an Organizational Unit for Users accounts that have not authenticated to the Domain in 1