Skip to content

Instantly share code, notes, and snippets.

@junecastillote
Created January 2, 2020 13:36
Show Gist options
  • Save junecastillote/5ebbd7aa0cd5ca6e6b0acb437290de2a to your computer and use it in GitHub Desktop.
Save junecastillote/5ebbd7aa0cd5ca6e6b0acb437290de2a to your computer and use it in GitHub Desktop.
List all Shell Application Namespace in Windows
$ShellApp = New-Object -ComObject ShellApp.Application # initialize the COM application object
foreach($i in $(0..100)){ # from 0 to 100. The highest number is just a guess.
$ShellApp.namespace($i) | Where-Object {$_.Title} | # try the namespace, and return only if there's value in title
Select-Object `
@{n="Dec";e={$i}}, ` # Base 10 (Dec) namespace index
@{n="Hex";e={"0x" + ('{0:X}' -f $i)}}, ` # Base 16 (Hex) namespace index
Title, `
@{N="Path";e={$_.Self.Path} } # Folder path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment