Jump to content

WMI equivalents to WMIC


rsn
 Share

Recommended Posts

I'm trying to do away with using WMIC (since it's deprecated). One example is the following:

wmic path win32_UserProfile Where SID="<SID>" Delete

Generally I'll use something like:

$WMIObj.ExecMethod("Class", "Method", "Params")

But there's no method to call that performs the delete. Is there just an Exec versus ExecMethod? If so, how/where do I find the syntax?

Link to comment
Share on other sites

Even in the absolute latest Insider Windows 11 build 25284, WMIC still exists.
They only deprecated the system PATH variable.
I still use it but insert the full path in my command as such,

@SystemDir & '\wbem\WMIC.exe

(only tested on Windows Pro - I have no access to Home versions)

Edited by Shark007
Link to comment
Share on other sites

Fair point. Windows 11 is at least 2 years away on our roadmap. 

I've only ever used pro and enterprise so I can't speak to home editions either. I'd guess it's either not present or disabled since MS leaves out so much in those versions. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...