rsn Posted January 30, 2023 Share Posted January 30, 2023 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 More sharing options...
Shark007 Posted January 31, 2023 Share Posted January 31, 2023 (edited) 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 January 31, 2023 by Shark007 rsn 1 Link to comment Share on other sites More sharing options...
rsn Posted January 31, 2023 Author Share Posted January 31, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now