r/PowerShell • u/Rosjkor • 27d ago
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
8
u/JSChronicles 27d ago
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
5
u/MaxFrost 27d ago
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 querywould just be checking service state.3
u/DragonspeedTheB 27d ago
Just to clarify sc.exe is not a powershell command. It is a WINDOWS (DOS) native binary to interact with the windows service manager.
2
u/ron3090 27d ago
Why these two command specifically? If you haven't used PowerShell before, what are you trying to use them for?
1
u/Rosjkor 26d ago
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 27d ago
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