2

为什么我不能将 -pipelinevariable 与 get-netfirewallrule 一起使用?

PS C:\> Get-NetFirewallRule -PipelineVariable myfirewall | Get-NetFirewallPortFilter

Get-NetFirewallRule : Cannot retrieve the dynamic parameters for the cmdlet. Object reference not set to an instance of an object.
At line:1 char:1
+ Get-NetFirewallRule -PipelineVariable firewall | Get-NetFirewallPortF ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-NetFirewallRule], ParameterBindingException
    + FullyQualifiedErrorId : GetDynamicParametersException,Get-NetFirewallRule
4

0 回答 0