Automation: WMIC And PowerShell Command's


With WMIC becoming "un-used" (I'm uncertain if it actually won't be used in the future)...

Is there any projection of Microsoft deprecating the dos batch language?
 

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
They haven't said anything like that yet, and it would be a huge undertaking. They generally deprecate things for many years before they are removed, so it would be well-known. It would be a huge thing to remove cmd or batch.
 

My Computer

System One

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Core i7-1260P
    Motherboard
    NUC12WSBi7
    Memory
    64 GB Micron PC4-25600
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    on-board Realtek HD Audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840 x 2160
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Crucial MX500 2 TB
    Antivirus
    Microsoft Defender
Currently, I use Windows "*.bat" and Linux-based "*.sh".
Is there a scripting language that can be used by both Windows and Linux-based?
(i.e., Python, Perl, etc)
 

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
Do note that the member who posted this is on build 28020.1362
It also applies for clean install of 25H2. I had problems installing AMD chipset drivers because of it.
 

My Computer

System One

  • OS
    Home26H2Can
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 8600G (07/24)
    Motherboard
    ASROCK B650M-HDV/M.2 (07/24) BIOS 4.21 AGESA ComboAM5 1.3.0.1 (04/26)
    Memory
    2x32GB Kingston FURY DDR5 5600 MHz CL36 @5200 CL36 (07/24)
    Graphics Card(s)
    ASROCK Radeon RX 6600 Challenger D 8G @48FPS (08/24)
    Sound Card
    Creative Sound BlasterX AE-5 Plus (05/24)
    Monitor(s) Displays
    24" Philips 24M1N3200ZS/00 (05/24)
    Screen Resolution
    1920×1080@165Hz via DP1.4
    Hard Drives
    Kingston KC3000 NVMe 2TB (05/24)
    ADATA XPG GAMMIX S11 Pro 512GB (07/19)
    PSU
    Seasonic Core GM 550 Gold (04/24)
    Case
    Fractal Design Define 7 Mini with 3x Noctua NF-P14s/12@555rpm (04/24)
    Cooling
    Noctua NH-U12S with Noctua NF-P12 (04/24)
    Keyboard
    HP Pavilion Wired Keyboard 300 (07/24) + Rabalux 76017 Parker (01/24)
    Mouse
    Logitech M330 Silent Plus (01/26)
    Internet Speed
    500/100 Mbps via RouterOS (05/21) & TCP Optimizer
    Browser
    Edge, Brave for YouTube, LibreWolf for FB
    Antivirus
    NextDNS blocking 1/3 Traffic
    Other Info
    Phone: Motorola Moto G86 (02/26)
    Backup: Hasleo Backup Suite (PreOS)
    Headphones: Sennheiser RS170 (09/10)
    Chair: Huzaro Force 4.4 Grey Mesh (05/24)
    Notifier: Xiaomi Mi Band 9 Milanese (10/24)
    FlexCore USB-C 3.2 Gen 1 (M) to LAN (F) (08/25)
Currently, I use Windows "*.bat" and Linux-based "*.sh".
Is there a scripting language that can be used by both Windows and Linux-based?
(i.e., Python, Perl, etc)
I'll start a new thread for the quoted post.
It's potentially redirecting from the original idea of this thread.
 

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
Currently, I use Windows "*.bat" and Linux-based "*.sh".
Is there a scripting language that can be used by both Windows and Linux-based?
(i.e., Python, Perl, etc)
PowerShell 7 on Linux. But seriously, most of the industry is standardizing on Python.

PERL still exists, but now ignored since it's annoying idiosyncrantic (look how often people brag about obtuse PERL code). PERL used to have an advantage in available libraries, but Python has caught up.

But PowerShell is what you learn to administer Windows. A lot of high-level or portable code is written in Python, but those devs don't have the Windows API hooks that the PS devs enjoy (because they have source code access).
 

My Computer

System One

  • OS
    Windows 7

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
The replacement of WMIC has been answered.
All of my subsequent questions have been answered.
Cmd and PS isn't going away soon.
Python seem's to becoming a shared language between Windows and Linux.
Maybe use Python to create executable file for the respective kernel and/or shell.

Is it wise to use Python to automated end-user task's?
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
Which scripting language's are installed by default in Windows
I know .bat .ps1 ,cmd
Once again you've answered the new question.
You're really on a roll today.

There's no reason to expect any of those three to die any time soon.
[Unlike VBScript which is deprecated & which might die with 26H2.]
The next time I sit down to review my own scripts, I "intend" to study PS properly for the first time.
my ditty - Batch file and PowerShell guides [post #7] - ElevenForum


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
I believe my thoughts are beginning to have me going in circles.
I'm gonna stop and take a breather and try to slow my roll and calm my thoughts.
 

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
"itinerary"
No.
I have an aspiration but I also have abundant laziness & an awful lot of distractions.
I'll probably look over the TenForums guides in my linked list again first then study Learn PowerShell Scripting in a Month of Lunches as it seemed quite good to me [on a swift perusal] so I bought it.
One of my primary goals will be writing PS equivalents to replace my existing VBScripts but I want to study the subject properly so I write them in a well-structured way instead of continuing my current ad-hoc approach and then maintain them well [and not by just chucking in things then hoping for the best & fiddling with them until they more-or-less work].


Best of luck to you,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
Thank you.
Sound's like something I need to improve on.

Is it possible to use Python to convert back n forth between "*.sh" and "*.ps1"?
Or did I already answer that one too? :/
 

My Computer

System One

  • OS
    Windows 11 Home 64-bit v10.0.26200 N/A Build 26200
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo 82XB IdeaPad Slim 3 15IAN8
    CPU
    Intel(R) Core(TM) i3-N305 (1.80 GHz)
    Memory
    8.00 GB (7.70 GB usable)
    Graphics Card(s)
    8.00 GB (7.70 GB usable)
    Hard Drives
    238 GB SSD
    Mouse
    ELAN touchpad; Logitech Wireless
Please pick a lane!!

PS kinda resembles Bourne shell scripting, because it was partially inspired by it. When Jeff Snover first tried to sell the idea of PS's predecessor, it was essentially an UNIX-like shell but with Windows bindings for system calls.

The major difference is everything in an UNIX shell is parsing output, piped as a text stream. You redirect output from one app, to another tool like grep or awk, and then redirect it again before you accept the results as your data.

With PS, you don't need a grep or awk to do the parsing. The language does that natively.

The major step forward in PS, is when you pipe the results of a built-in command, it can send a complex data object and not simple a string of text. A single command call can return multiple details in one pass. Then you "pick" at the returned object to grab which details you're interested in. It's very powerful.

And when you can't do something in PS, you just call an external executable. And you can redirect the output.

CMD, Python and PowerShell are all distinct programming languages. If you know UNIX shell scripting, PS will look familiar. If you know C, Python is somewhat close. CMD is a totally obtuse beast for parsing strings, if you're coming from an UNIX/Linux background. I was an UNIX admin for two decades, before moving to Windows.

Batch scripting is a terrible (and limited) programming language. And before the arrival of PS, everyone just had to learn how to program in an inferior manner. PS was designed for Windows admins, which is probably why it confuses casual users who don't program or do admin work.
 

My Computer

System One

  • OS
    Windows 7
Back
Top Bottom