The best way to use M-x grep with Emacs is to download a port of
grep. See Other useful ports.
If you want a quick solution without installing extra tools, a poor
substitute that works for simple text searches is to specify the built
in Windows command
findstr as the command to run at the
M-x grep prompt. Normally you will want to use the /n
findstr, to have it print the line numbers for