Skip to content

Commit

Permalink
parameterset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RamblingCookieMonster committed Mar 21, 2015
1 parent 6581e30 commit 2af891b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Get-NetworkStatistics.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,18 @@
param(

[Parameter(Position=0, ValueFromPipeline=$true,ParameterSetName='name')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='address')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='port')]
[System.String]$ProcessName='*',

[Parameter(Position=0, ValueFromPipeline=$true,ParameterSetName='address')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='name')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='port')]
[System.String]$Address='*',

[Parameter(ValueFromPipeline=$true,ParameterSetName='port')]
[Parameter(Position=0, ValueFromPipeline=$true,ParameterSetName='port')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='address')]
[Parameter(ValueFromPipeline=$false,ParameterSetName='name')]
$Port='*',

[Parameter()]
Expand Down Expand Up @@ -265,6 +271,7 @@

#Filter the object
if($remotePort -notlike $Port -and $localPort -notlike $Port){
write-verbose "remote $Remoteport local $localport port $port"
Write-Verbose "Filtered by Port:`n$result"
continue
}
Expand Down

0 comments on commit 2af891b

Please sign in to comment.