Put the following in a Windows batch file and execute with AD Domain Admin priviledges

@echo off
echo Enter hostname or IP...
set /p input=
wmic.exe /node:"%input%" ComputerSystem Get UserName
pause