4 Replies Latest reply: Mar 4, 2014 11:56 PM by mark.schuren RSS

Get root vol with PowerShell toolkit

Currently Being Moderated

Hi all.


I'm using it in a WFA command in order to append data into a configuration file (i.e RC file, hosts...).

At the moment i'm appending with Write-NaFile and it requires full path (/vol/vol0/etc/....) and not /etc/***.

I can't use always /vol/vol0 and need to query the filer and see which volume name is the root volume.


Did you ever try to get with one command / concatenated commands in PowerShell ToolKits a filer's root volume name?



Many thanks in advance!


  • Re: Get root vol with PowerShell toolkit
    Currently Being Moderated

    I just tried and found a builtin cmdlet:


    PS H:\> Get-NaVolRoot


    Name                      State       TotalSize  Used  Available Dedupe  FilesUsed FilesTotal Aggregate

    ----                      -----       ---------  ----  --------- ------  --------- ---------- ---------

    volroot                   online       197,6 GB    3%   191,3 GB False          8k         7M aggr0



    What version of the DataONTAP PS Toolkit are you using?


    I'm on:


    PS H:\> Get-Module DataOntap | fl


    Name              : DataOntap

    Path              : C:\Program Files (x86)\NetApp\Data ONTAP PowerShell Toolkit\DataOntap\DataOntap.psd1

    Description       : Data ONTAP PowerShell Toolkit

    ModuleType        : Manifest

    Version           : 2.4.0

    NestedModules     : {DataONTAP, DataONTAP.C, DataONTAP.Alias}

    ExportedFunctions : Add-NaHelpInfoUri

    ExportedCmdlets   : {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpolicyExtension...}

    ExportedVariables : {}

    ExportedAliases   : {Add-NcHostIscsiConnection, Connect-NcHostIscsiTarget, ConvertTo-NcLun, ConvertTo-NcVhd...}

More Like This

  • Retrieving data ...