I want to query for specific server names and populate a text file with the names of all the servers in the AD.
This is where I am at the moment:
for /f "tokens=1 delims=," %%a in ('dsquery computer -name *sql* -limit 10000 ^| find /i "="') do (
if not "%%a"=="" set ServerName=%%a
Can anyone help me here.