Permalink
Browse files

Added options to Get-ComRuntimeExension to simplify returning certain…

… types of extensions.
  • Loading branch information...
James Forshaw
James Forshaw committed Oct 19, 2018
1 parent c648ac8 commit 9333d7380eb39d231afe0df43dccf3fbbfe41eb8
Showing with 22 additions and 1 deletion.
  1. +22 −1 OleViewDotNet.PowerShell/OleViewDotNet.psm1
@@ -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
@@ -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
)
@@ -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.