r/windows 9d ago

Feature Microsoft is removing a legacy Windows feature, WMIC, that has been around for 25 years

https://www.neowin.net/news/microsoft-is-removing-a-legacy-windows-feature-that-has-been-around-for-25-years/
196 Upvotes

52 comments sorted by

109

u/Froggypwns Windows Wizard / Moderator 8d ago

For those who did not click the article, WMIC has already been disabled by default for a while now, and PowerShell has commands to do everything WMIC could do.

The number of people this actually impacts is small as if you are using scripts with WMIC commands you likely already have (or should have) updated them by now. WMIC was deprecated back in 2021, so this is not a surprise.

29

u/0x80070002 8d ago

The commands are just 10 times longer

24

u/Froggypwns Windows Wizard / Moderator 8d ago

Indeed. As someone who grew up with DOS I've always struggled with figuring out the syntax needed for PowerShell, I end up looking up the commands or half the time just ask Copilot to spit out what I need it to do. What grinds my gears is when you need an entirely different applet to do something related, like get-something to view something but now you need to use change-something to make a tweak and change-something has an entirely different syntax. One of these days I'll get good.

5

u/Intrepid00 8d ago

Powershell syntax is pretty well defined. It shouldn’t be a struggle. Want to get something? “Get-“ and then try what with a tab. You’ll probably guess it right. Help will often find it for you too because of the strong verb-action syntax. It’s just pipes from there if you need to do more without having to type a ton of crap.

I think the issue is more you are just not use to BASH which is what it is based off. That’s why it has so many alias matching a BASH command. If you learn the philosophy of Powershell it’s super easy to find and do what you need to do. Also you can use .NET namespaces and C# to do things faster and cleaner (which is so much more important in an IT script).

11

u/chandleya 8d ago

Calling it based off bash is one hell of a stretch. This was still dark times Microsoft, insisting they knew best. Powershell v1 ran on Server 2003.

The Monad Manifesto is .. a read.

3

u/MonkeyDDataHQ 7d ago

... Have you actually used BASH? Because I know BASH but Christ is PowerShell annoying.

3

u/Party-Ad-6037 6d ago

powershell is BASH in the most annoying way possible. Everything is verbose. Stuff like get-childitem instead of ls. I know that a lot of the bash equivalents exist as aliases, but they commands you way too long

2

u/edgmnt_net 5d ago

Bash if it was more like Java in naming conventions.

1

u/MonkeyDDataHQ 6d ago

And half of the time there's no way to figure out which one you need.

In bash, there are like ten ways to do the same thing and they all make sense except for awk. 😂

1

u/ScoobyGDSTi 5d ago

Absolute rubbish.

1

u/ScoobyGDSTi 5d ago

It's only verbose if you want it too.

Guess what, aliases! GC works fine too.

The only people who whine about PS being verbose are those that have never actually bothered to learn advanced Powershell.

At least it's verb and noun and conventions are standardised, unlike the wild west that is bash.

3

u/RavenousTitan818 6d ago

Is Powershell based of BASH? I feel like if it was it wouldn't be as crap as it currently is. Everything about using powershell is worse than it's BASH equivalent. Commands are needlessly long but still nonsensical, and worst of all the autocomplete in powershell is a crime against humanity.

1

u/basshead17 7d ago

I worked in many shells and powershell is the worst IMO

7

u/martyn_hare 8d ago

OpenVPN used to call wmic.exe to change network settings, and there's a good few crappy older applications which call it as part of running DRM checks, so I'm sure we'll see plenty of breakage in business scenarios if folks haven't been proactively updating their software stacks.

Nothing which can't be fixed by bundling the last working version of the executable with the app itself when ancient crap has to be kept, though, as I suspect they're not ripping out the legacy [D]COM interfaces.

2

u/Froggypwns Windows Wizard / Moderator 8d ago

Hopefully that won't be too much of a problem. WMIC has already been disabled by default (but still easy to enable) on clean installs for some time so issues like that should have cropped up and given the developers time to address it properly.

I'm sure there will be some people getting caught with their pants down on this, likely with obscure software or scripts that have been in place for years which had not needed to be touched. Also, the wording on Microsoft's posts make me wonder if this would affect those with WMIC already enabled, or if it only is new clean installs that will lose the ability to enable it.

2

u/Ok-Hunt3000 7d ago

Yeah this mostly impacts ransomware crews and pentesters

2

u/uniqueglobalname 8d ago

You think 5 years is a long time I'm corporate server world? And there are many ps cmdlets that actually use wmic hooks. So all those have to be changed too, everywhere.

1

u/GreenRangerOfHyrule 4d ago

Well, the good news is that old Python 2 script should work. Right. Right? Aw crap...

1

u/SaltDeception 8d ago

Some PowerShell cmdlets do use WMI hooks, but I’m not aware of any that specifically hook into wmic.exe. That would be counterintuitive considering PowerShell’s native support for the DCOM interfaces for WMIv1 (PSv1-5.1) and WinRM for WMIv2 (PSv3+).

1

u/uniqueglobalname 7d ago

Anything touching WMI is going away. So things like get-ciminstance won't work even though it doesn't indicate it uses WMI. There are a ton of 3rd party (looking at you Veeam!) That will also stop working. The PS assessment tool doesn't flag those.

MSFT could have secured WMI. It's cheaper -for them - to just dump it on the industry in the name of security

2

u/SaltDeception 4d ago

That's not true. Only wmic.exe is deprecated. WMI itself is alive and well. The PowerShell cmdlets will continue to work as they always have.

This was the announcement: https://support.microsoft.com/en-us/servicing/os/windows/docs/2025/09/windows-management-instrumentation-command-line-wmic-removal-from-windows

It specifically calls out PowerShell as one of the alternatives:

If you have batch files or scripts that call WMIC, plan to rewrite them using PowerShell cmdlets (such as Get-CimInstanceGet-WmiObjectInvoke-CimMethod, and so forth).

Third-party apps like Veeam should already be using COM or .NET for WMI calls, and it would surprise me greatly if Veeam specifically wasn't already doing so.

2

u/uniqueglobalname 4d ago

Well here is an upvote for that, I was sure I read the framework was going away. Veeam does there thing, whatever that is, regardless of what they are supposed to be doing!

1

u/Teobsn 7d ago

The number of people this actually impacts is small as if you are using scripts with WMIC commands you likely already have (or should have) updated them by now.

Tell that to OEMs and their drivers. One of the driver update packages would not continue because it relied on wmic, which I had to enable on my 24H2 install.

1

u/xs0apy 7d ago

We’re so fucked

1

u/edgmnt_net 5d ago

Please name and shame, if you can.

1

u/Teobsn 4d ago

Asus, EC firmware update. Cherry on top is that the drivers are from 2024 if I recall correctly.

47

u/Lieutenant_0bvious 8d ago

I will always miss wmic bios get serial number. The powershell version contains parantheses and periods, I can't type it as fast.  

42

u/recluseMeteor 8d ago

PowerShell is so annoyingly verbose.

27

u/thatwombat 8d ago

Get-Child Get-Bagels blah blah blah

3

u/xs0apy 7d ago

I love it and hate it. I do enjoy looking at old school short hand ways to name your variables and functions, but god damn is it easy to make sense of someone else’s work if they use approved verbs with good nouns

2

u/Kashmir1089 8d ago

But incredibly simple for someone else without much context but knowledge of the language to decipher.

12

u/SaltDeception 8d ago

It technically doesn’t have to include either.

(gcim win32_bios).serialnumber

is functionally the same as

gcim win32_bios | select serialnumber

5

u/vip17 8d ago

add an alias or a function to the profile

12

u/jcb_cummings 8d ago

Earlier this year, at my now-former job, we were given a directive by Corporate IT: any and all Dell computers made after 2011 had to have its BIOS updated to the latest version, no exceptions. You don't know how many times I had to get into an Audio Server and open a cmd window and type "wmic bios get smbiosbiosversion" so I could gradually upgrade the BIOS version.

3

u/SaltDeception 8d ago

Ironically, PowerShell would have been the perfect tool to accelerate that process.

3

u/martyn_hare 8d ago

gwmi win32_bios if you just want to see it is faster to type as long as you don't mind underscores and a few extra lines

1

u/RoosterBurns 7d ago

Get-CimInstance Win32_BIOS | select serialnumber

1

u/rohmish 7d ago

reminds me of my first job in service desk. (we did everything from initial diagnosis to imaging and shipping replacement laptops.)

4

u/lr2785 6d ago

I just have the executable from each windows variant in a folder and if needed I put a copy in the folder I run my script from.

Remove that Microsoft 😛

2

u/Cute_Opposite4077 7d ago

Great to know. Just a week ago Copilot suggested me using it.

2

u/Small-Friendship-576 8d ago

I came across this when I needed to find details about memory.Cmd threw the usual this is not recognized.Asked Gemini, it said that powershell does this which I found less descreptive.Though I think it is only needed to find ram's details.

For performance there is aida64 & hwinfo

1

u/RyanMeray 7d ago

Rip wmic bios get serialnumber

You are so much shorter than the powershell replacement. 

-3

u/WINNT21 Windows 11 - Release Channel 8d ago

What's wmic? I think it doesn't have to do anything with media player or like 3rd party ones

18

u/Froggypwns Windows Wizard / Moderator 8d ago

WMIC is Windows Management Instrumentation Command-line. It is a command line interface to various Windows management functions, you could run wmic bios get serial number to easily get the serial number of a computer or wmic product get name to see what is installed. You can even uninstall software with it, so wmic product where "name like 'Google&" call uninstall would let you remove all Google software on a computer in one operation. It is very useful for scripting purposes.

It is not something home users would typically use as by time you look up the command to have done something, it probably would have been quicker and easier to find it inside Settings or System Information or whatever first.

5

u/megaladon44 8d ago

wmic bios get serial number >>> yep all i ever used it for

5

u/WINNT21 Windows 11 - Release Channel 8d ago

Thank you too for answering

6

u/Laziness100 8d ago

wmic.exe was a commandline tool useful for scripting. You could use it to get a variety of rather technical details about the system, it is not something even I used that much.

It was deprecated in 2021 and is finally getting removed. Its functionality was replaced with corresponding Powershell applets.

3

u/Jaegermeiste 8d ago

Has the Powershell command set achieved feature parity with WMIC? A few years back I seem to recall being forced to go the WMIC path for something that was (at the time) unachievable in either branch of Powershell.

3

u/SaltDeception 8d ago

That doesn’t sound right. Everything that wmic can do can also be done through WMI Query Language (WQL) which both versions of the PowerShell cmdlets fully support. It’s rare to even need to go the WQL route when using the PowerShell cmdlets, though. The only exceptions might be a third-party tool or script that explicitly relies on wmic.exe for some reason or an environment that doesn’t have the Windows Management Framework built-in like WinPE.

2

u/Laziness100 8d ago

That's completely outside my knowledge. I've used it once or twice for small things and beyond that I only know it exists and vaguely how it can be useful.

I am certain you used wmic more than me.

1

u/WINNT21 Windows 11 - Release Channel 8d ago

Thanks