为什么我不能将-pipeline变量与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