Does Verbs() support Submenus

I have written a small piece of code which displays context menu for Devices&Printers. This does not work for menu items, which have submenus.

$o = new-object -com Shell.Application
$folder = $o.NameSpace(“shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}”)
foreach ($item in $folder.Items())
If ($item.Name -eq ‘iCR6X–1613950’)

below does not print menu items which have submenu



Any help is appreciated.


Both of these show the items I’d expect. They are not blank. Not sure why they would be blank for you?

foreach ($item in $folder.Items()){$}
foreach ($item in $folder.Items())
    foreach($verb in $item.verbs())

Some of the output

CutePDF Writer
HP USB Optical Mouse
Microsoft Print to PDF
HP Compaq LA2405 Wide LCD Monitor
Logitech H570e Mono
LifeCam Cinema

&Network settings            
S&ound settings              
&Mouse settings              
&Keyboard settings           
S&ystem properties           
Device &installation settings
Po&wer options               
Windows &Update  

Thanks for the reply.

You can easily reproduce this by using the below powershell script(, which also does not display menu containing submenus.

$o = new-object -com Shell.Application
$folder = $o.NameSpace(“C:\Windows\System32”)
$file.Verbs()|select Name