WMIC Deprecated - HEADS UP


  1. Posts : 841
    Windows 10 Pro 21H2
       #1

    WMIC Deprecated - HEADS UP


    I used WMIC /? > WMIC.txt to view all of WMIC's commands and at the top of the page it says in red "WMIC is deprecated". After doing some looking on the internet, I found that Powershell is going to be a replacement and that some of WMIC commands may return errors.
      My Computer


  2. Posts : 41,474
    windows 10 professional version 1607 build 14393.969 64 bit
       #2

    windows 10 - Has WMIC been un-deprecated? - Super User


    https://docs.microsoft.com/en-us/pre...#wmi-providers

    Code:
    Windows System Resource Manager
    Windows System Resource Manager (WSRM) is deprecated. Similar functionality is provided by Hyper-V.
    
    WMI providers
    The WMI provider for Simple Network Management Protocol (SNMP) is deprecated because the SNMP service is being deprecated.
    
    The WMI provider for the Win32_ServerFeature API is deprecated.
    
    The WMI provider for Active Directory is deprecated. Manage Active Directory with PowerShell cmdlets.
    
    The WMI command-line tool (Wmic) is deprecated. Use PowerShell cmdlets instead.
    
    The namespace for version 1.0 of WMI is deprecated. Prepare to adapt scripts for a revised namespace.

    https://docs.microsoft.com/en-us/ans...-download.html
      My Computer


  3. Posts : 841
    Windows 10 Pro 21H2
    Thread Starter
       #3

    Considering the deprecation of WMIC, I am attempted to use PowerShell and ran into a problem with deleting $Recycle.Bin in that the "$" produces "can't find path" error. If I replace the "$" with "*" or "?" it works, but this can be dangerous, does anyone know how to use "$Recycle.Bin" and delete it.

    Code:
    Remove-Item C:\$Recycle.Bin -Recurse -Force -Confirm:$false
      My Computer


  4. Posts : 3,274
    Win10
       #4

    Haven't tried that specific command myself, but have you tried escaping the $ with a back tick ` like so:

    Remove-Item C:\`$Recycle.Bin -Recurse -Force -Confirm:$false

    eg. this does work to get the Recursed Child-Items in C:\$Recycle.Bin (from an admin ps console)
    Get-childitem -force -path C:\`$Recycle.Bin -recurse
      My Computers


  5. Posts : 841
    Windows 10 Pro 21H2
    Thread Starter
       #5

    das10 said:
    Haven't tried that specific command myself, but have you tried escaping the $ with a back tick ` like so:

    Remove-Item C:\`$Recycle.Bin -Recurse -Force -Confirm:$false

    eg. this does work to get the Recursed Child-Items in C:\$Recycle.Bin (from an admin ps console)
    Get-childitem -force -path C:\`$Recycle.Bin -recurse
    It works, thanks das10.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:52.
Find Us




Windows 10 Forums