If you want to search computer name of a system on network through its username what you have to do is copy this script and paste it on notepad save it with any name but extension should be .bat or .cmd forexample: "username.cmd"
@ECHO OFF
:GETUSERNAME
ECHO.
SET UName=
SET /P UName=Enter Username for %USERDOMAIN%:
IF [%UName%]==[] (
ECHO Please provide username.
CALL :GETUSERNAME)
NET USER "%UName%" /DOMAIN 2>NUL>NUL
IF ERRORLEVEL 1 (
ECHO Username not found in Active Directory.
GOTO :GETUSERNAME)
ECHO Please wait... &ECHO.
FOR /F "delims=\\ " %%c IN ('NET VIEW ^|FIND "\\"') DO (
PING -n 1 -l 10 -w 100 %%c |FIND /I "TTL" >NUL
IF NOT ERRORLEVEL 1 (
REG QUERY "\\%%c\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName |FIND /I "%UName%" >NUL
IF NOT ERRORLEVEL 1 ECHO %UName% is logged onto %%c))
ECHO.
PAUSE
FOR /L %%v IN (1,1,24) DO ECHO.
PAUSE
:ENDSCRIPT
EXIT
Blog Archive
Popular Posts
-
Hello friends, I am here with one of the most craziest problem's solution which is BIOS passwords. Mostly people set passwords on Bios a...
-
I have been looking around lately at all the old hardware I have lying around and thought what could I do with it all? Media center? Web s...
-
Most people know that you need to keep your wireless network secure but how many people know how to check their wireless encryption and ma...
-
Having a printer at home or in the office is an absolute necessity if you don't want to run to the library or to a professional p...
-
Power distribution in server racks come in a number of different varieties. It used to be that voltage and amps were the only conside...