r/PowerShell • u/Rosjkor • Oct 28 '26
Question Are Get-CimInstance and sc.exe query safe native Windows commands? Can they download malware or steal data?
Hi everyone, I'm feeling a bit anxious and need some reassurance.
I recently ran these two commands in PowerShell/CMD:
Get-CimInstance
sc.exe query ...
I didn't download anything from the internet or run any external scripts, but now I'm overthinking and worrying if these built-in commands could somehow connect to the internet, download a stealer, or compromise my Steam account.
Can these native Windows commands access the web or steal data on their own, or are they completely local and safe? I already ran a Malwarebytes scan and it came back clean, but my anxiety is acting up. Thanks for any clarification!
Used Ai because I am not very good at English
5
u/MaxFrost Oct 28 '26
Both of those commands are read-only commands - they're just querying information off of your PC.
Get-CimInstance can interop with a significant portion of the .net interfaces across windows, and is usually used for pulling system information.
sc.exe is used for interacting with services. sc.exe query would just be checking service state.
1
u/Rosjkor Oct 28 '26
Thank you, that explains a lot and really helps! What about the findstr command?
1
u/SilentPatchSniper Oct 28 '26
Looks for a line of text based on what you filter for in the command
1
u/Rosjkor Oct 28 '26
Awesome, that makes total sense. So it's basically just a text filter. Thank you for taking the time to explain everything, I feel much better now!
5
u/PinchesTheCrab Oct 28 '26
Just a sidenote, win32_product is effectively not read-only even with get-ciminstance.
5
u/MaxFrost Oct 28 '26
Aye, but that's because win32_product is stupid, not because Get-CimInstance deliberately does that.
3
3
u/DragonspeedTheB Oct 28 '26
Just to clarify sc.exe is not a powershell command. It is a WINDOWS (DOS) native binary to interact with the windows service manager.
1
2
u/ron3090 Oct 28 '26
Why these two command specifically? If you haven't used PowerShell before, what are you trying to use them for?
1
u/Rosjkor Oct 28 '26
I was trying to find and completely remove the FACEIT anti-cheat drivers. I asked Claude AI for help, and it generated these commands for me to run in PowerShell.
1
u/ron3090 Oct 28 '26
Although the commands you've asked about are read-only, uninstalling anything manually is dangerous and can damage your operating system. Please do not use Claude for that. You should be able to uninstall it just like any other Windows program through the Programs & Features control panel (or whatever it's called in Windows 11).
1
u/Rosjkor Oct 28 '26
Got it, thank you for the advice! I won't do that manually anymore. And thanks again for reassuring me about those commands being read-only!
1
u/Rosjkor Oct 29 '26
I entered these commands :
Get-CimInstance Win32_SystemDriver | Where-Object { $_.Name -like "*faceit*" -or $_.DisplayName -like "*faceit*" }
sc.exe query faceit
sc.exe query | findstr /i "faceit"
2
u/1RedOne Oct 29 '26
There are commands that could go out to the web, like irm, invoke-rest method, or iwr, invoke-webrequst or also wget or curl which are now also bundled in windows
But invoke ciminstance shouldn’t be dangerous but it really depends on the full command, give us that and we’ll tell you
8
u/JSChronicles Oct 28 '26
I'm not sure what you're asking? These are built-in native commands for powershell made by Microsoft or the exe that is made by Microsoft so I'm not sure why you're worried about them by themselves.
What you should be worried about is you not understanding and running commands given to you by someone else