You are on page 1of 17

NetAppDocs PowerShell Module

Overview and Usage Guide


Jason Cole, NetApp
May 2015

Abstract
This guide is intended to provide an overview of NetAppDocs and highlight some usage
examples.

TABLE OF CONTENTS
1

Overview.................................................................................................................................................3
1.1

Available Functions ........................................................................................................................................ 3

Features ..................................................................................................................................................4

Installation ..............................................................................................................................................5

3.1

System Requirements .................................................................................................................................... 5

3.2

Installation Procedure ..................................................................................................................................... 5

3.3

Initial PowerShell Session Prerequisites ........................................................................................................ 8

Usage Examples ....................................................................................................................................8


4.1

Importing the Module ...................................................................................................................................... 8

4.2

Accessing the Built-in Help ............................................................................................................................. 9

4.3

Clustered Data ONTAP (Cluster View) ......................................................................................................... 10

4.4

Clustered Data ONTAP (SVM View) ............................................................................................................ 10

4.5

7-Mode ......................................................................................................................................................... 11

4.6

ASUP Data Collection .................................................................................................................................. 11

4.7

Creating Differences Reports ....................................................................................................................... 13

4.8

Data Sanitization .......................................................................................................................................... 13

4.9

Using Alternate Credentials .......................................................................................................................... 15

Troubleshooting ..................................................................................................................................15

Known Issues ......................................................................................................................................15

Support .................................................................................................................................................16

Version History ..........................................................................................................................................16

LIST OF TABLES
Table 1) NetAppDocs functions. .................................................................................................................................... 3
Table 2) NetAppDocs-Lite functions. ............................................................................................................................. 4
Table 3) Data sanitization options. ............................................................................................................................... 14

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

1 Overview
The NetAppDocs tool is written as a PowerShell module and contains a set of functions that automate the
creation of NetApp site design documentation. NetAppDocs can generate Excel, Word and PDF
document types. The data contained in the output documents can be sanitized for use in sites where the
data may be sensitive.

1.1

Available Functions

The following functions make up the NetAppDocs module.


Table 1) NetAppDocs functions.

System Type

Function Name

Description

Clustered Data
ONTAP

Get-NtapClusterData

Gathers data from clustered Data ONTAP storage


systems.

GetNtapClusterAsupData

Gathers data for clustered Data ONTAP storage


systems using ASUPs.

FormatNtapClusterData

Parses the raw data from the GetNtapClusterData/GetNtapClusterAsupData functions and optionally
sanitizes the data for secure environments.

FindNtapAsupClusterId

Used to find the cluster identifier for a clustered Data


ONTAP storage system (using the cluster name and a
node serial number).

Find-NtapClusterAsup

Used to find a specific ASUP set for a clustered Data


ONTAP storage system.

Get-NtapVserverData

Gathers SVM specific data from clustered Data


ONTAP storage systems.

ConvertToNtapVserverData

Used to convert clustered Data ONTAP cluster data


from the Get-NtapClusterData function to SVM
specific data.

FormatNtapVserverData

Parses the raw data from the GetNtapVserverData/ConvertToNtapVserverData functions and optionally
sanitizes the data for secure environments.

Get-NtapFilerData

Gathers data from 7-Mode storage systems.

GetNtapFilerAsupData

Gathers data for 7-Mode storage systems using


ASUPs.

Format-NtapFilerData

Parses the raw data from the GetNtapFilerData/Get-NtapFilerAsupData


functions and optionally sanitizes the data for secure
environments.

Find-NtapFilerAsup

Used to find a specific ASUP set for a 7-Mode storage


system.

Out-NtapDocument

Used to write output documentation using the output


from the Format-* functions.

UpdateNtapWordDocument

Used to add Visio drawings and update the TOCs of a


previously created Word document.

Clustered Data
ONTAP (SVM)

7-Mode

Common

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

System Type

Function Name

Description

Compare-NtapDocsData

Used to create the differences report from two XML


outputs generated using the Format-* functions
(using the -XmlFile parameter with the OutNtapDocument function).

The following functions make up the NetAppDocs-Lite module.


Table 2) NetAppDocs-Lite functions.

System Type

Function Name

Description

Clustered Data
ONTAP

Get-NtapClusterData

Gathers data from clustered Data ONTAP storage


systems.

Clustered Data
ONTAP (SVM)

Get-NtapVserverData

Gathers SVM specific data from clustered Data


ONTAP storage systems.

7-Mode

Get-NtapFilerData

Gathers data from 7-Mode storage systems.

2 Features
The features available in NetAppDocs are listed below.

Supports NetApp 7-Mode and clustered Data ONTAP systems.

Creates NetApp site design documentation.

Creates detailed inventory reports in Word, Excel and PDF formats.

Provides a current snapshot of the state of the storage system.

Creates a summary of objects (aggregates, volumes, LUNs, and so on).

Can include existing Visio drawings in the Word/PDF output.

AutoSupport (ASUP)

Captures the data for a storage system from the ASUP database.

Note:

Differences report

The output data can be sanitized for use in secure sites (data such as IP addresses, hostnames,
volume names, and so on). A mappings file can be generated, which provides a reference back
to the original string.

NetAppDocs-Lite package available for live data collection only.

Used by Professional Service resources performing 7-Mode to clustered Data ONTAP transitions.

Data sanitization

The framework for localized template is in place. Additional locales will be supported soon.

Transition planning and assessment (7-Mode)

SVM-specific documentation can be generated and delivered to the SVM owner, without
compromising the data for the other SVMs in the cluster.

Localized templates

A differences report can be generated using the formatted output produced at two different times
(for config management purposes).

SVM-specific documentation (SMT/Co-Lo type facilities)

ASUP data is not as complete as the data is captured from a live system.

The NetAppDocs-Lite package, which only supports the data collection functions, can be used by
the customer if directed by the PS representative (for instance, if a site visit is not possible). The
data collected can then be sent to the PS representative for document generation.

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

3 Installation
The installer package is the recommended method for installing this module.

3.1

System Requirements

1. Microsoft Windows 32-bit/64-bit computer.


2. Microsoft Windows PowerShell v2.0 or higher.
3. Microsoft .Net Framework v3.5 or higher.
4. NetApp Data ONTAP PowerShell Toolkit (included in the zip file or install package).
5. NetApp Data ONTAP 7.2.x, 7.3.x, 8.0.x (7-Mode), 8.1.x, 8.2.x and 8.3.x
6. Internal NetApp connection required for ASUP data collection.

3.2

Installation Procedure
Note:

The installation procedure for the NetAppDocs-Lite package is identical to the main
installation, with the exception of the installer file.

1. Download and install Windows PowerShell and the .Net Framework.


Note:

PowerShell is installed by default in the most recent Windows version.

2. Download the latest NetAppDocs installer file (.msi).


3. Extract the zip file to a local folder (if necessary).
4. Double-click on the installer file (.msi) and follow the installation screens to complete the installation.
5. Click Next.

6. Accept the license agreement and click Next.

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

7. Choose the installation path (default path is recommended). Click Next.

8. Click Install.

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

9. Accept any additional UAC dialog boxes and click Finish to complete the installation (optionally
select Display the release notes).

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

3.3

Initial PowerShell Session Prerequisites

Setting up the PowerShell Execution Policy


After installing the module, the default PowerShell execution policy must be modified to anything other
than the default of Restricted.
Note:

Setting the PowerShell execution policy only needs to be performed once per system.

1. Open PowerShell window. Click Start -> All Programs -> Accessories -> Windows PowerShell Folder.
Right click on Windows PowerShell executable and select Run as administrator as shown below.

2. Set the PowerShell execution policy and verify:


Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution
policy might expose you to the security risks described in the about_Execution_Policies help
topic at http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution
policy?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
PS C:\>
PS C:\> Get-ExecutionPolicy
RemoteSigned
PS C:\>

3. Close the PowerShell session.

4 Usage Examples
4.1

Importing the Module

Import the module only once per session.


1. Import the module.
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\> Import-Module NetAppDocs
PS C:\>

2. Verify the module is loaded (optional).


PS C:\> Get-Module -Name NetAppDocs

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

ModuleType Version
Name
ExportedCommands
---------- ------------------------Script
2.6.0.102 NetAppDocs
{CompareNtapDocsData, ConvertTo-FormattedNumber, ConvertTo-NtapVserverData, ExpandGzipFile...}

4.2

Accessing the Built-in Help

The module is fully documented using the PowerShell help subsystem. Once the module is imported, you
can invoke the Show-NtapDocsHelp function. This will open a web browser to the HTML help files.
PS C:\> Show-NtapDocsHelp

You can also utilize the native PowerShell functions for accessing help information. To show all the
available functions:
PS C:\> Get-Command -Module NetAppDocs
CommandType
----------Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function
Function

Name
---Compare-NtapDocsData
ConvertTo-FormattedNumber
ConvertTo-NtapVserverData
Expand-GzipFile
Find-NtapAsupClusterId
Find-NtapClusterAsup
Find-NtapFilerAsup
Format-NtapClusterData
Format-NtapFilerData
Format-NtapVserverData
Get-NtapCiscoUcsData
Get-NtapClusterAsupData
Get-NtapClusterData
Get-NtapClusterSwitchData
Get-NtapFilerAsupData
Get-NtapFilerData
Get-NtapToolkitVersion
Get-NtapVserverData
Out-GzipFile
Out-NtapDocument
Show-NtapDocsHelp
Update-NtapWordDocument

ModuleName
---------NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs
NetAppDocs

More detailed information on any function can be shown using the Get-Help cmdlet. To display the full
help for a function, use the -Full parameter with the Get-Help function.
PS C:\> Get-Help -Name Get-NtapClusterData
NAME
Get-NtapClusterData
SYNOPSIS
Gathers all configuration information from a NetApp cDOT storage system.
SYNTAX
Get-NtapClusterData [-Name] <String[]> [-Credential <PSCredential>] [-Port <Int32>] [-Timeout
<Int32>] [-ForceSecure] [-DisablePingCheck] [<CommonParameters>]
Get-NtapClusterData [-AbstractController] <AbstractController[]> [-Timeout <Int32>] [DisablePingCheck] [<CommonParameters>]
DESCRIPTION
Uses the Data ONTAP PowerShell toolkit to gather as much configuration information as
possible. This data can be used to automate build docs and health checks. It can also be used
for historical configuration information.
RELATED LINKS

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

https://communities.netapp.com/groups/usps-scripts-and-tools
REMARKS
To see the examples, type: "get-help Get-NtapClusterData -examples".
For more information, type: "get-help Get-NtapClusterData -detailed".
For technical information, type: "get-help Get-NtapClusterData -full".
For online help, type: "get-help Get-NtapClusterData -online"

Additional Notes
By default, no progress or output is shown on the screen while the functions are running (errors will
always be displayed). To enable additional status output, use the -Verbose parameter on any of the
functions. As an example:
PS C:\> Get-NtapClusterData -Name den-cdot -Verbose | Format-NtapClusterData -Verbose | OutNtapDocument -ExcelFile X:\den-cdot.xlsx -Verbose

4.3

Clustered Data ONTAP (Cluster View)

Perform Collection and Documentation Generation in a Single Step


This example shows how to gather the data from a single cluster and output the documents in a single
step.
PS C:\> Get-NtapClusterData -Name 'cluster1' | Format-NtapClusterData | Out-NtapDocument WordFile 'D:\Output\cluster1.Docx' -ExcelFile 'D:\Output\cluster1.xlsx'

Collect in One Step and Generate Documentation in a Second Step


This example is useful if you need to quickly gather the data from the storage system(s) and then
generate the documentation at a later time.

Collect from a single storage system

PS C:\> Get-NtapClusterData -Name cluster1 | Export-Clixml -Path 'D:\Output\cluster1_raw.xml'

Collect from multiple storage systems

PS C:\> 'cluster1', 'cluster2' | ForEach-Object { $_ | Get-NtapClusterData | Export-Clixml -Path


"D:\Output\$($_)_raw.xml" }

Generate documentation

PS C:\> Get-ChildItem -Path 'D:\Output' -Filter *_raw.xml | Format-NtapClusterData | OutNtapDocument -WordFile 'D:\Output\Site.Docx' -ExcelFile 'D:\Output\Site.xlsx'

4.4

Clustered Data ONTAP (SVM View)

Perform Collection and Documentation Generation in a Single Step for all SVMs
This example gathers the SVM data for all SVMs directly from a clustered Data ONTAP system and
generates the documents required.
PS C:\> Get-NtapVserverData -ClusterName 'cluster1' | Format-NtapVserverData | Out-NtapDocument WordFile 'D:\Output\All_SVMs.docx' -ExcelFile 'D:\Output\All_SVMs.xlsx'

Perform Collection and Documentation Generation in a Single Step for Specific


SVMs
This example gathers the SVM data for specific SVMs directly from a clustered Data ONTAP system and
generates the documents required.
PS C:\> Get-NtapVserverData -Name 'vs_nfs', 'vs_cifs' -ClusterName 'cluster1' | FormatNtapVserverData | Out-NtapDocument -WordFile 'D:\Output\Nas_SVMs.docx' -ExcelFile
'D:\Output\Nas_SVMs.xlsx'

10

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

Create SVM Specific Documentation from Data Created by Get-NtapClusterData


This example shows how to gather the data one time from the cluster and provide both cluster
documentation and the SVM-specific data.

Gather the raw data

PS C:\> Get-NtapClusterData -Name 'cluster1' | Export-Clixml -Path 'D:\cluster1_raw.xml'

Create the cluster specific documentation

PS C:\> Get-ChildItem -Path 'D:\cluster1_raw.xml' | Format-NtapClusterData | Out-NtapDocument ExcelFile 'D:\Output\cluster1_data.xlsx'

Create the SVM specific documentation

PS C:\> Get-ChildItem -Path 'D:\cluster1_raw.xml' | ConvertTo-NtapVserverData | FormatNtapVserverData | Out-NtapDocument -ExcelFile 'D:\Output\All_SVMs-from_ClusterData.xlsx'

4.5

7-Mode

Perform Collection and Documentation Generation in a Single Step


This example shows how to gather the data from two controllers and output the documents in a single
step.
PS C:\> Get-NtapFilerData -Name 'controller1', 'controller2' | Format-NtapFilerData | OutNtapDocument -WordFile 'D:\Output\Site.Docx' -ExcelFile 'D:\Output\Site.xlsx'

Collect in One Step (Raw XML Output) and Generate Documentation in a Second
Step
This example is useful if you need to quickly gather the data from the storage system(s) and then
generate the documentation at a later time.

Collect from multiple storage systems

PS C:\> Get-NtapFilerData -Name 'controller1', 'controller2' | Export-Clixml -Path


'D:\Output\7Mode-Controllers_raw.xml'

Generate documentation

PS C:\> Get-ChildItem -Path 'D:\Output\7Mode-Controllers_raw.xml' | Format-NtapFilerData | OutNtapDocument -WordFile 'D:\Output\Site.Docx' -ExcelFile 'D:\Output\Site.xlsx'

4.6

ASUP Data Collection

By default, the Get-NtapClusterAsupData and Get-NtapFilerAsupData functions will search for


the latest weekly ASUP set. You can also search for the latest user_triggered ASUP set using the AsupSubject user_triggered parameter. To locate an ASUP set other than the latest, you must
either use the Find-NtapClusterAsup/Find-NtapFilerAsup functions, or supply the actual
ASUPID's (these can be found using NTSTP/SmartSolve).

Clustered Data ONTAP


Perform Collection and Documentation Generation in a Single Step
This example shows how to gather the data from a single cluster and output the documents in a single
step.
PS C:\> Get-NtapClusterAsupData -Cluster 'den-cdot:394e82bf-485c-11e2-86b3-123478563412' |
Format-NtapClusterData | Out-NtapDocument -WordFile 'D:\Output\den-cdot_Asup.Docx' -ExcelFile
'D:\Output\den-cdot_Asup.xlsx'

11

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

Collect in One Step (Raw XML Output) and Generate Documentation in a Second Step
This example is useful if you need to quickly gather the data from the storage system(s) and then
generate the documentation at a later time.

Collect from a single storage system

PS C:\> Get-NtapClusterAsupData -Cluster 'den-cdot:394e82bf-485c-11e2-86b3-123478563412' |


Export-Clixml -Path 'D:\Output\den-cdot_Asup-raw.xml'

Collect from multiple storage systems

PS C:\> 'cluster1:394e82bf-485c-11e2-86b3-123478563412', 'cluster2:dc1505b8-b993-11e3-9ee7123478563412' | ForEach-Object { $_ | Get-NtapClusterAsupData | Export-Clixml -Path


"D:\Output\$(($_ -split ':')[0])_Asup-raw.xml" }

Generate documentation

PS C:\> Get-ChildItem -Path 'D:\Output' -Filter *_Asup-raw.xml | Format-NtapClusterData | OutNtapDocument -WordFile 'D:\Output\Site_Asup.Docx' -ExcelFile 'D:\Output\Site_Asup.xlsx'

Find the Cluster Identifier and Perform the Data Collection


If you do not know the Cluster Identifier (UUID) you will need to search the ASUP database for it using
the serial number from one of the nodes in the cluster. You can then gather the data as in the previous
examples.

Search for the Cluster UUID

PS C:\> Find-NtapAsupClusterId -ClusterName den-cdot -NodeSerialNumber 700000454908


cluster_name
: den-cdot
cluster_identifier : 394e82bf-485c-11e2-86b3-123478563412
sys_serial_no
: 700000454908
sys_model
: FAS6080
sys_operating_mode : Cluster-Mode
sys_version
: 8.2.2P2

Collect from the storage system using the cluster_identifer

PS C:\> Get-NtapClusterAsupData -Cluster 'den-cdot:394e82bf-485c-11e2-86b3-123478563412' |


Export-Clixml -Path 'D:\Output\den-cdot-Asup_raw.xml'

Find the First Validated Weekly ASUP Set Using Specific Dates and Perform the Data
Collection
This example highlights how to search the ASUP database using specific dates and performing the data
collection.
PS C:\> Find-NtapClusterAsup -Cluster 'den-cdot:394e82bf-485c-11e2-86b3-123478563412' -StartDate
2014-12-01 -EndDate 2014-12-15 | Get-NtapClusterAsupData | Export-Clixml -Path 'D:\Output\dencdot-Asup_raw.xml'

Perform the Data Collection Using Specific ASUPIDs


This example performs the data collection using the specified ASUPIDs.
Get-NtapClusterAsupData -AsupId 2015012500120554, 2015012423440127 | Export-Clixml
'D:\Output\den-cdot-Asup_raw.xml'

7-Mode
Perform Collection and Documentation Generation in a Single Step
This example shows how to gather the data from two controllers and output the documents in a single
step.
PS C:\> Get-NtapFilerAsupData -System 'mtharvard:30020945!mtmassive:30020946' | FormatNtapFilerData | Out-NtapDocument -WordFile 'D:\Output\mtharvard-mtmassive_Asup.Docx' -ExcelFile
'D:\Output\mtharvard-mtmassive_Asup.xlsx'

12

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

Collect in One Step (Raw XML Output) and Generate Documentation in a Second Step
This example is useful if you need to quickly gather the data from the storage system(s) and then
generate the documentation at a later time.

Collect from multiple storage systems

PS C:\> Get-NtapFilerAsupData -System 'mtharvard:30020945!mtmassive:30020946' | Export-Clixml Path 'D:\Output\mtharvard-mtmassive_Asup-raw.xml'

Generate documentation

PS C:\> Get-ChildItem -Path 'D:\Output\mtharvard-mtmassive_Asup-raw.xml' | Format-NtapFilerData |


Out-NtapDocument -WordFile 'D:\Output\mtharvard-mtmassive_Asup.docx' -ExcelFile
'D:\Output\mtharvard-mtmassive_Asup.xlsx'

Find the First Validated Weekly ASUP Set using Specific Dates and Perform the Data
Collection
PS C:\> Find-NtapFilerAsup -System 'mtharvard:30020945!mtmassive:30020946' -StartDate 10-15-2014
-EndDate 11-15-2014 | Get-NtapFilerAsupData | Export-Clixml 'D:\Output\mtharvard-mtmassive_Asupraw.xml'

Perform the Data Collection Using Specific ASUPIDs


This example performs the data collection using the specified ASUPIDs.
C:\PS> Get-NtapFilerAsupData -AsupId 2015011716380597, 2015011716330550 | Export-Clixml
'D:\Output\mtmassive_mtharvard-Asup_raw.xml'

4.7

Creating Differences Reports

In order to create differences reports, the data from the Format-Ntap*Data functions must be saved as
.XML files through the Out-NtapDocument function using the -XmlFile parameter. This functionality is
only available starting with NetAppDocs v2.6.0.
PS C:\> Get-NtapClusterData -Name 'den-cdot' | Format-NtapClusterData | Out-NtapDocument -XmlFile
X:\den-cdot_01-2014.xml
PS C:\> Get-NtapClusterData -Name 'den-cdot' | Format-NtapClusterData | Out-NtapDocument -XmlFile
X:\den-cdot_02-2014.xml
PS C:\> Compare-NtapDocsData -XmlFile1 X:\den-cdot_01-2014.xml -XmlFile2 X:\den-cdot_02-2014.xml
| Out-NtapDocument -XlxsFile X:\den-cdot_DiffReport.xlsx

4.8

Data Sanitization

Each of the Format-Ntap*Data functions support a -SanitizeLevel parameter, allowing the use of
NetAppDocs within secure sites. The sanitization options are different depending on the system type and
are shown in the table below.

13

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

Table 3) Data sanitization options.

System Type

Numeric
Value

Sanitization Option

7-Mode

1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384

IP Address
MAC Address
Controller Name
DNS Domain Name
Vfiler Name
License Code
Aggregate Name
Volume Name
Qtree Name
LUN Name
LUN Initiator Group Name
Other Servers
SNMP Community String
CIFS Share Name
Active Directory NetBIOS Name

Clustered Data
ONTAP

1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768

IP Address
MAC Address
Node Name
DNS Domain Name
SVM Name
License Code
Aggregate Name
Volume Name
Qtree Name
LUN Name
LUN Initiator Group Name
Other Servers
SNMP Community String
CIFS Share Name
Active Directory NetBIOS Name
Data ONTAP Cluster Name

Clustered Data
ONTAP (SVM)

1
2
8
16
128
256
512
1024
2048
4096
8192
16384

IP Address
MAC Address
DNS Domain Name
SVM Name
Volume Name
Qtree Name
LUN Name
LUN Initiator Group Name
Other Servers
SNMP Community String
CIFS Share Name
Active Directory NetBIOS Name

In order to sanitize multiple entries, simply add up the numbers.

7-Mode (sanitize IP Addresses and Controller Names: 1 + 4)

PS C:\> Get-NtapFilerData -Name mtmassive, mtharvard | Format-NtapFilerData -SanitizeLevel 5 |


Out-NtapDocument -ExcelFile X:\7-Mode_sanitized.xlsx

14

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

Clustered Data ONTAP (sanitize IP Address, Node Name and SVM Name: 1 + 4 + 16)

PS C:\> Get-NtapClusterData -Name den-cdot | Format-NtapClusterData -SanitizeLevel 21 | OutNtapDocument -ExcelFile X:\den-cdot_sanitized.xlsx

4.9

Using Alternate Credentials

All of the previous examples assume that the user account running the commands has administrative
access to the controllers. If that is not the case, Get-NtapFilerData, Get-NtapClusterData and
Get-NtapVserverData will accept alternate credentials through the -Credential parameter.
If the user account credentials will be the same across all controllers or clusters (for instance, 'root'), then
you can prompt for the credentials once and those credentials will be used for each connection.

7-Mode

PS C:\> $Credential = Get-Credential


PS C:\> Get-NtapFilerData -Name 'controller1', 'controller2' -Credential $Credential | ...

Clustered Data ONTAP

PS C:\> $Credential = Get-Credential


PS C:\> Get-NtapClusterData -Name 'cluster1', 'cluster2' -Credential $Credential | ...

Clustered Data ONTAP (SVM)

PS C:\> $Credential = Get-Credential


PS C:\> Get-NtapVserverData -ClusterName 'cluster1' -Credential $Credential | ...

If, however, each controller or cluster has different credentials, there is a mechanism within the NetApp
Data ONTAP PowerShell Toolkit for caching those credentials. It is possible to save the credential for the
current user or for all users (-SystemScope parameter). Upon connection to a controller, the credentials
cache will be queried for an entry to the controller specified.

7-Mode

PS C:\> Add-NaCredential -Controller 'controller1' -Credential (Get-Credential)

Clustered Data ONTAP

PS C:\> Add-NcCredential -Controller 'cluster1' -Credential (Get-Credential)

Note:

More help on Add-NaCredential, Get-NaCredential and Remove-NaCredential (or the


equivalent Add-NcCredential, Get-NcCredential and Remove-NcCredential for
clustered Data ONTAP) can be found within the help files for the Data ONTAP module. (ImportModule DataONTAP; Show-NaHelp).

5 Troubleshooting
If the execution policy is not set correctly, an error such as the one below will be generated. To overcome
this issue, follow the steps outlined in Setting up the PowerShell Execution Policy section.

6 Known Issues

15

(cDOT/7-Mode) The ShelfDetails table in the output may show MisassignedDrives. This is due to a
ZAPI issue where the shelf bay information returns duplicate DiskUids. A more accurate method of
calculating this information in those instances is yet to be obtained. This issue has been identified on
only one system.

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

(All) The Visio drawings may get added to the Word document in a different order than what is shown
in the Visio file. This is due to an unresolved issue within the Aspose.Diagram product.

(cDOT/Vserver) CIFS Shares: If a CIFS server is status-admin down then ZAPI may or may not
return the shares for that SVM. There is no pattern to this and similar behavior is seen at the CLI.
(cifs share show returns the data, but cifs share show -instance does not).

(cDOT/Vserver) In the SnapMirrorRelationships table of the output, intercluster LIFs may be missing
from the Get-NtapVserverData function whereas they will be shown if using GetNtapClusterData | ConvertTo-NtapVserverData. It is not clear if this is a ZAPI burt or if it is
desired behavior (where the IC SnapMirror relationships are not returned when the ZAPI is called
from a Vserver context).

(7-Mode) An error may be reported against a single node system if the cluster (cf) license is present,
or cf is disabled for an HA pair (or a more serious node-down issue). Depending on the version of
ONTAP, ZAPI may report a generic 'Internal Error'. When this happens there is no way of knowing if it
is a valid scenario where this error can be safely ignored or not. So, if you encounter this just know
that there may be valid situations where this error does not apply and can be safely ignored.

(cDOT/7-Mode) IPv6 sanitization might not be fully correct. The documentation only prefix
'2001:DB8::/32' was used to generate the sanitized string, yet to obtain IPv6 enabled systems to test
with. It is not clear if it is working as desired.

7 Support
For any additional support issues or enhancement requests, please visit the communities site
(https://communities.netapp.com/groups/usps-scripts-and-tools) or send an email to ng-NetAppDocssupport.

Version History
Version

Date

Document Version History

Version 1.0

May 2015

Initial version.

16

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

2015 NetApp, Inc. All rights reserved. No portions of this document may be
reproduced without prior written consent of NetApp, Inc. Specifications are subject
to change without notice. NetApp, the NetApp logo, Go Further, Faster, AltaVault,
ASUP, AutoSupport, Campaign Express, Cloud ONTAP, Clustered Data ONTAP,
Customer Fitness, Data ONTAP, DataMotion, Fitness, Flash Accel, Flash Cache,
Flash Pool, FlashRay, FlexArray, FlexCache, FlexClone, FlexPod, FlexScale,
FlexShare, FlexVol, FPolicy, GetSuccessful, LockVault, Manage ONTAP, Mars,
MetroCluster, MultiStore, NetApp Insight, OnCommand, ONTAP, ONTAPI, RAID
DP, RAID-TEC. SANtricity, SecureShare, Simplicity, Simulate ONTAP,
SnapCenter, Snap Creator, SnapCopy, SnapDrive, SnapIntegrator, SnapLock,
SnapManager, SnapMirror, SnapMover, SnapProtect, SnapRestore, Snapshot,
SnapValidator, SnapVault, StorageGRID, Tech OnTap, Unbound Cloud, WAFL
and other names are trademarks or registered trademarks of NetApp Inc., in the
United States and/or other countries. All other brands or products are trademarks
or registered trademarks of their respective holders and should be treated as such.
A current list of NetApp trademarks is available on the Web at
http://www.netapp.com/us/legal/netapptmlist.aspx.

NetApp
provides
norights
representations
or warranties
regarding
accuracy,without
reliability,
or serviceability
of
2015 NetApp,
Inc. All
reserved. No portions
of this document
may the
be reproduced
prior written
consent of
any information
or recommendations
provided
this NetApp,
publication,
or with
respect
to any
results
that may
NetApp,
Inc. Specifications
are subject to change
without in
notice.
the NetApp
logo,
Go further,
faster,
and trademarks
or
of NetApp,
in the United
and/or other
countries.
All other brands provided
or products herein.
are
beregistered
obtainedtrademarks
by the use
of the Inc.
information
or States
observance
of any
recommendations
The
trademarks
or registered
trademarksisofdistributed
their respective
and
should
as such.
information
in this document
ASholders
IS, and
the
use be
of treated
this information
or the implementation of
any recommendations or techniques herein is a customers responsibility and depends on the customers
ability to evaluate and integrate them into the customers operational environment. This document and
the information contained herein may be used solely in connection with the NetApp products discussed
in this document.
17

NetAppDocs PowerShell Module Overview and Usage Guide

2015 NetApp, Inc. All Rights Reserved

You might also like