Skip to content

Commit

Permalink
Updating to ignore common parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHolmes committed Oct 12, 2016
1 parent 8efb0fa commit 7fe8e7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AutoRuns.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ Begin {
)
Begin {
## Add 'All' if nothing else was supplied
if(($PSBoundParameters.Keys | ? { $_ -notin "ShowFileHash","VerifyDigitalSignature" }).Count -eq 0)
$parametersToIgnore = ("ShowFileHash","VerifyDigitalSignature") +
[System.Management.Automation.PSCmdlet]::CommonParameters +
[System.Management.Automation.PSCmdlet]::OptionalCommonParameters
if(($PSBoundParameters.Keys | ? { $_ -notin $parametersToIgnore }).Count -eq 0)
{
$All = [switch]::Present
}
Expand Down

0 comments on commit 7fe8e7e

Please sign in to comment.