PureStorage-Connect / PowerShellSDK2

Pure Storage FlashArray PowerShell Software Development Kit (SDK) version 2.
https://support.purestorage.com/Solutions/Microsoft_Platform_Guide
Apache License 2.0
8 stars 7 forks source link

PureStoragePowerShellSDK2 cmdlets return blank lines when running within an IDE #2

Closed hugh-martin closed 3 years ago

hugh-martin commented 3 years ago

When using the PureStoragePowerShellSDK2 module from within an IDE, such as VS Code, Sapien PowerShell Studio, ISE, etc., some (or all) cmdlets from the PureStoragePowerShellSDK2 module return only blank lines. For example, all of these will return blank lines:

Get-Pfa2Volume

$vols = Get-Pfa2Volume #no output expected here
$vols
$vols | Select-Object Name
$vols | Get-Member
Write-Output $vols

These commands, however, will return data:

$count = ($vols | Measure-Object).Count #no output expected here
$count

$volnames = $vols.Name #no output expected here
$volnames

foreach ($vol in $vols) {
    $volname = $vol.Name
    Write-Output $volname
}

This issue was confirmed by Pure support. See case #00934363.

mikenelson-io commented 3 years ago

I remember some internal discussion around this issue. And I do know a bug has been filed. Although, we have not been able to reproduce the issue every time with different IDEs and/or different versions of PowerShell. As an example, when I run these commands in the VSCode Insiders build with PoSH 7.1.3 terminal, it returns output for me. When run inside the PoSH 5.1 IDE, it does not return output.

hugh-martin commented 3 years ago

Understood. It happens for me 100% of the time with Sapien PowerShell Studio 2020 and 2021, as well as ISE on Windows 10 1909.

github-actions[bot] commented 3 years ago

Stale issue message