Powershell get CLSID of desktop icons

Filip 831 Reputation points

Hello everybody.

Can I get somehow CLSID of icon on my desktop.
For example recycle bin have CLSID "{645FF040-5081-101B-9F08-00AA002F954E}" but can i somewho get it with powershell.
In registry editor it look that: But i want get the CLSID of recycle bin with powershell.


Is it possible to get the CLSID of recycle bin or other application on my desktop?

Thanks for help.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,627 questions
No comments
{count} votes

Accepted answer
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 18,351 Reputation points Microsoft Employee


    You may try something like this

    $path = 'HKLM:\SOFTWARE\Classes\CLSID'  
    $data = 'Recycle Bin'   
    Get-ChildItem -Path $path | ForEach-Object{  
        Get-ItemProperty -Path $_.PSPath | Where-Object {$_.'(default)' -eq $data} | Select-Object -ExpandProperty PSChildName  

    Best Regards,
    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful