Windows Domain - Searching All Domain Computers At Once?

This one should be pretty simple.

I’m suspicious that a certain file is on some PC on the network, but it shouldn’t be. I’m a domain administrator, so I should have access to all the administrative shares on the network.

Now, I can go ahead and search each individual machine until I find the file, but that seems needlessly pain-in-the-assish.

Does anyone know a way to do a fire and forget search, where I tell the system what I’m looking for and it then searches all the drives in the domain?

-Joe

Without installing software, running scripts, or something of the kind, not as far as I know. I’ve been a systems administrator for ten years in various Active Directory environment. Still, there might be a way.

If you can get a list of names of the machines, and they are all sharing files and have no firewall blocking you, you ought be able to use the good old for loop. Something like

for /f %m in (machinelist.txt) do dir \%m\c$\filename.txt /s >> results.txt

That would search from the root of the C volume. Maybe try it without the >> first to see that it works.

There may be a way of scripting the gathering of machine names too, so you could script the whole thing.

NET VIEW /DOMAIN should list all the machines in the domain.

I’m not sure that the output of Ximenean’s method will actually identify the machine. And you need to use the /a switch on dir to search everything.

You should be able to add a line to your login script(if you use one) to search the local drive for the file, and save the search results to a network drive. Use system variables, and name each file the name of the computer. Then you just have to search the files for any hits.

If you do this make sure you put it at the end of the login script, or atleast after the login script has mapped the drive you are trying to save the results to.

This will only search systems that are logged into. Also it will run every time someone logs in if it has already run or not. You can get fancy so it only scans once, but probably not worth it for a one time thing.