Subscribe

Using Powershell to configure a new NetApp filer

I am tasked with deploying ~400 NetApp over the next two years and I am looking for a way to automate the configuration of each system.

I have the information to do the manual setup via CLI and also via the Web GUI.  I am familiar with Powershell and would like to it, but I am open to any method would work.

One issue that I have come across has been HTTP/HTTPS not being available.  I am not sure what needs to be configured on the filer before I start.

Has anyone configured a file from scratch using Powershell and if so could you share any info and gotchas?

I have included the help file for the cmdlet Initialize-NaController for reference.

NAME

    Initialize-NaController

 

SYNOPSIS

    Initialize a new Data ONTAP controller.

SYNTAX

Initialize-NaController [-DhcpAddress] <String> [-Hostname] <String> [-Gateway] <String> [-PrimaryInterface <String>] [-PrimaryInterfaceAddress <String>] [-PrimaryInterfaceNetmask <String>] [-Password <String>] [-Timezone <String>] [-EmailHost <String>] [-EmailAddress <String>] [-Location <String>] [-DnsDomain <String>] [-DnsServers <String[]>] [-NisDomain <String>] [-NisServers <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

    Initialize a new Data ONTAP controller.

    This cmdlet is intended for roll-out scenarios where the controller has had no initial configuration.  Upon powering up, the controller will obtain an IP address via DHCP.  Given the DHCP address, this cmdlet will contact the controller and assign it a hostname and configure the primary network interface.

PARAMETERS

    -DhcpAddress <String>

        The network address at which the controller may be contacted, typically a DHCP-assigned address.

        Required?                    true

        Position?                    1

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -Hostname <String>

        The hostname to set for the controller.

        Required?                    true

        Position?                    2

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

   -Gateway <String>

        The network routing gateway address for the controller.

        Required?                    true

        Position?                    3

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -PrimaryInterface <String>

        The name of the primary network interface.  If not provided, this defaults to "e0a".

        Required?                    false

        Position?                    named

        Default value                e0a

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -PrimaryInterfaceAddress <String>

        The IP address to assign to the primary network interface.  If not provided, this defaults to the required DHCP address.

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -PrimaryInterfaceNetmask <String>

        The netmask value to assign to the primary network interface.

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -Password <String>

        The root password for the controller.

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -Timezone <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -EmailHost <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -EmailAddress <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -Location <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -DnsDomain <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -DnsServers <String[]>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -NisDomain <String>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -NisServers <String[]>

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false

    -WhatIf

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       false

        Accept wildcard characters?  false

    -Confirm

        Required?                    false

        Position?                    named

        Default value

        Accept pipeline input?       false

        Accept wildcard characters?  false

    <CommonParameters>

        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer and OutVariable. For more information, type,

        "get-help about_commonparameters".

INPUTS

OUTPUTS

NOTES

        Category: toolkit

    --------------  Example 1 --------------

    C:\PS>Initialize-NaController 10.61.165.227 indy 10.61.165.1

    Contact a new storage controller at address 10.61.165.227.  Assign it the hostname 'indy' and routing gateway 10.61.165.1.  By default, the primary network interface will be 'e0a' and will have the address 10.61.165.227.

RELATED LINKS

    Find-NaController

    Connect-NaController

Re: Using Powershell to configure a new NetApp filer

As long as you know the DHCP-provided address of the unconfigured controller, you should be able to configure it using Initialize-NaController.  Here is an example:  https://communities.netapp.com/docs/DOC-6248

Re: Using Powershell to configure a new NetApp filer

Can I use Initialize-NaController on an already configured controller to change its setup?

Re: Using Powershell to configure a new NetApp filer

Omarr, I don't recall how Data ONTAP behaves in that case (and I don't have a controller I can spare to try that at the moment).  If you try it, please let us know the result.

Re: Using Powershell to configure a new NetApp filer

Hi Omarr,

I'm working on similar initiatives for a few customers, to create Day-0 configuration / provisioning workflows using WFA (which uses PowerShell Toolkit under the covers).  We can chat if you like to see if WFA will meet your needs too.

Cheers,

Dave