Skip to content

Commit

Permalink
Added options to Get-ComRuntimeExension to simplify returning certain…
Browse files Browse the repository at this point in the history
… types of extensions.
  • Loading branch information
James Forshaw committed Oct 19, 2018
1 parent c648ac8 commit 9333d73
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion OleViewDotNet.PowerShell/OleViewDotNet.psm1
Expand Up @@ -2379,6 +2379,12 @@ Get Windows Runtime extensions.
This cmdlet gets the Windows Runtime extensions from a database.
.PARAMETER ContractId
Specify a contract ID to lookup.
.PARAMETER Launch
Only show Windows.Launch extensions.
.PARAMETER Protocol
Only show Windows.Protocol extensions. Select out the Protocol property to see the name.
.PARAMETER BackgroundTasks
Only show Windows.BackgroundTasks extensions.
.PARAMETER Database
The COM database to use.
.INPUTS
Expand All @@ -2397,6 +2403,12 @@ function Get-ComRuntimeExtension {
Param(
[Parameter(Mandatory, ParameterSetName = "FromCategoryId")]
[string]$ContractId,
[Parameter(Mandatory, ParameterSetName = "FromLaunch")]
[switch]$Launch,
[Parameter(Mandatory, ParameterSetName = "FromProtocol")]
[switch]$Protocol,
[Parameter(Mandatory, ParameterSetName = "FromBackgroundTasks")]
[switch]$BackgroundTasks,
[OleViewDotNet.COMRegistry]$Database
)

Expand All @@ -2413,5 +2425,14 @@ function Get-ComRuntimeExtension {
"FromCategoryId" {
$Database.RuntimeExtensionsByContractId[$ContractId] | Write-Output
}
"FromLaunch" {
$Database.RuntimeExtensionsByContractId["Windows.Launch"] | Write-Output
}
"FromProtocol" {
$Database.RuntimeExtensionsByContractId["Windows.Protocol"] | Write-Output
}
"FromBackgroundTasks" {
$Database.RuntimeExtensionsByContractId["Windows.BackgroundTasks"] | Write-Output
}
}
}
}

0 comments on commit 9333d73

Please sign in to comment.