Wmic Windows: 11 Alternative

# Stop a service Stop-Service -Name Spooler Start-Service -Name Spooler Change startup type Set-Service -Name Spooler -StartupType Automatic Software/Product Management List Installed Software

Save this as wmic.ps1 for basic compatibility: wmic windows 11 alternative

# Physical memory Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum Get-CimInstance Win32_OperatingSystem | Select-Object TotalVisibleMemorySize, FreePhysicalMemory # Stop a service Stop-Service -Name Spooler Start-Service

# Better alternative to wmic product Get-Package | Select-Object Name, Version, ProviderName Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall* | Select-Object DisplayName, DisplayVersion For 64-bit apps Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall* | Select-Object DisplayName, DisplayVersion BIOS Information # BIOS details Get-CimInstance Win32_BIOS | Select-Object Manufacturer, Name, SerialNumber, Version Network Configuration # IP configuration Get-NetIPAddress | Select-Object InterfaceAlias, IPAddress, AddressFamily Network adapters Get-NetAdapter | Select-Object Name, InterfaceDescription, Status, LinkSpeed Instead of wmic nic get Get-CimInstance Win32_NetworkAdapter | Where-Object $_.NetEnabled -eq $true Creating Useful Aliases Add these to your PowerShell profile for quicker transitions: wmic windows 11 alternative

# Create custom functions to mimic WMIC syntax function wmic-os Get-CimInstance Win32_OperatingSystem function wmic-cpu Get-CimInstance Win32_Processor function wmic-disk Get-CimInstance Win32_LogicalDisk function wmic-service Get-Service function wmic-process Get-Process function Get-SystemSummary [PSCustomObject]@ OS = (Get-CimInstance Win32_OperatingSystem).Caption CPU = (Get-CimInstance Win32_Processor).Name Cores = (Get-CimInstance Win32_Processor).NumberOfCores RAM_GB = [math]::Round((Get-CimInstance Win32_PhysicalMemory

param( [string]$Class, [string]$Get, [string]$Where ) switch ($Class) "os" Select-Object * "cpu" Get-CimInstance Win32_Processor "diskdrive" Get-CimInstance Win32_DiskDrive "logicaldisk" Select-Object * "process" Select-Object * "service" Select-Object * "product" Get-Package default Write-Host "Class not supported in this compatibility script"

GMT+8, 2026-3-9 08:39 , Processed in 0.025039 second(s), 7 queries , Gzip On.

© 2015-2016 Powered by Discuz!

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí