NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

read-ncdirectory no longer working after update

PawelSliwa
4,340 Views

Hello,

 

some time ago I created script that shows me directories on each volume.

After module update to 9.11.1.2208 the script fails on read-ncdirectory command with error message:

Read-NcDirectory : Invalid path. Path should be in format /vol/<volume name>/<directory name>

 

part of code:

foreach ($volume in (Get-NcVol -Aggregate ************)) {

$vserver = $volume.Vserver
$volname = $volume.Name
$level1 = Read-NcDirectory -VserverContext $vserver -Path /vol/$volname|?{($_.Name -notlike ".*") -and ($_.Type -like "directory")-and ($_.Name -notlike "Trash")}

}

 

how can i modify the script to work again?

5 REPLIES 5

Ontapforrum
4,302 Views

Could you try this for path:

 

-Path  "/vol/$($volName)"

PawelSliwa
4,283 Views

changing variable to full volume name in path also ends the same

PawelSliwa
4,298 Views

Did try - the same result

Drew_C
4,030 Views

@PawelSliwa   Were you able to get this working? If so, could you share the solution?

Community Manager \\ NetApp

PawelSliwa
3,971 Views

unfortunately i didn't find any solution yet 😞

and no help from Netapp on this

Public