PoshCode Logo PowerShell Code Repository

Start menu verbs by Rov3_ 6 weeks ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/6672"></script>download | new post

Show every single verb for applications in the start menu

  1. $items = ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items())
  2.  
  3. $dasReport = @()
  4.  
  5. $items | foreach {
  6.    
  7.     $itemName = $_.name
  8.        
  9.         $_.verbs() | foreach {
  10.  
  11.         $properties = @{
  12.                     "Verbs"=$_.name
  13.                     "Name"=$itemName
  14.                     }
  15.        
  16.             $object = New-Object –TypeName PSObject –Prop $properties
  17.             $dasResult = Write-Output $object
  18.             $dasReport += $dasResult
  19.             }
  20.         }

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me