Created
January 31, 2020 16:36
-
-
Save Doug-Moody/9a937eeca20b800347a8150a6ab50260 to your computer and use it in GitHub Desktop.
A CMD Batch file to quickly locate anyone on the domain that has any matching letters in name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:START | |
color 0 | |
setlocal | |
cls | |
echo. | |
set user= | |
set /p user=Enter First or Last name, or part of a name: | |
cls | |
color a | |
echo Listing all AD accounts with %user% in their name. | |
echo ############# BELOW ARE ALL USERS NAMES ############## | |
dsquery user -name "*%user%*" | |
echo. | |
echo ############## BELOW ARE AD USER ACCTS ################ | |
DSQUERY USER -name "*%user%*" | DSGET USER -samid -display | |
echo. | |
echo. | |
echo If using LookUp, try combinations of first initial, middle initial | |
echo lastname like swhinton instead of shinton | |
echo. | |
pause | |
goto :START |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment