ONTAP Discussions

Bug: Get-Nc* collections does not play well with pipelines

tyteen4a03
1,191 Views

For example, if I do something like `$info = Get-NcCifsServer -Controller $controller | Where-Object { $_.Vserver -eq "vserver"} | Select -First 1`, it would output the result in the console, not executing the `Select` or storing the results into `$info`.

 

To work around this, I have had to split the statement into two:

 

$_info = Get-NcCifsServer -Controller $controller

$info = $_info | Where-Object { $_.Vserver -eq "vserver" } | Select -First 1

0 REPLIES 0
Public