The code doesn't work for me. On every machine I tried the code you shared on, it produces the same error: It's totally safe to test it right now, since it doesn't work. Error: Code: 'Select-String' is not recognized as an internal or external command, operable program or batch file.
Oh, OK. Odd. I didn't write it so not sure what the deal is. I've tested it a few times and had it work fine.
@lomticksoftoast and @Dude Guyman The Select-String cmdlet used in the code is intended for PowerShell. Regular Command Prompt (or Windows Terminal with Command Prompt as the default CLI shell) can't execute it out of the box.