Microsoft Virtualization Discussions

Get-NcVol missing volumes in PowerShell 7

Hackysack
512 Views

Hi everyone.

I'm fairly new to PowerShell. I was tasked with verifying all of our scripts run in PowerShell 7. Currently they are running in PowerShell 5.  When used in PowerShell 5, the Get-NcVol command works perfectly, but in PowerShell 7 it misses nearly all of our volumes.  I installed the latest version of NetApp PowerShell Toolkit (ver. 9.17.1), but no change. I'm puzzled by this behavior.

 

The main issue right now is the command:  Get-NcVol.  

 

Example:  PowerShell 5.

     PS C:\Users\_dhiggins> $volumes = Get-NcVol

     PS C:\Users\_dhiggins> $volumes.count
     566    <-- this is correct

 

Example:  PowerShell 7:

     PS C:\Users\_dhiggins> $volumes = Get-NcVol
     PS C:\Users\_dhiggins> $volumes.count
     23     <-- Why?? Nothing changed.

 

We are using Windows Server 2022 Standard, ver. 21H2 (PowerShell 7 is running in Visual Studio Code), fully updated.

 

Has anyone encountered this?  Do I need to use the Get-NcVol command differently in PS7??  I am unable to find a solution. I contacted NetApp and they directed me here.

Thank you, Doug

2 REPLIES 2

RobDBA
265 Views

I'm not seeing any differences in the counts and I have 559 volumes spread across 3 clusters.  Here are the versions of the software I'm using:

 

9.9.1.2106 NetApp.ONTAP

NetApp Release 9.12.1P14

NetApp Release 9.13.1P2

PS 5.1.19041.6456

PSCore 7.4.6

 

Hackysack
260 Views

Thx for the information RobDBA.

This is very odd.   Here are our versions:

        NetApp ONTAP ver  9.15.1P5   (entire cluster)

        PowerShell  ver  7.5.4

        Visual Studio code ver  1.106.3

I've been unable to find a resolution or workaround. I guess for now we'll have to continue using PS5.

Public