Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
Hi All,
I need some help for a powershell script. I like to do a report for some Netapp Clusters to receive Information about Name,Ip,Location, Nodes, Nodes IP mgmt ip , aso. and all helpfull stuff
How can I extract this data, and the best way would be to do this in a biger foreach loop with multible clusters..
$myCol = @()
Connect-NaController $clusters -Credential $ControllerCredential
[System.Array]$Nodes = Get-NcNode Foreach($Node in $Nodes){ $x = "" | Select Node,Model,NodeSerialNumber,NodeSystemId,Version,IP
$x.Node = $Node.Node $x.model = $Node.NodeModel $x.NodeSerialNumber = $Node.NodeSerialNumber $x.NodeSystemId = $Node.NodeSystemId $x.Version = $Node.ProductVersion.Split(":")[0] $x.IP = $Node | Get-NcNetInterface -Role node_mgmt | select Address
$mycol += $x
}
$mycol
... View more
Hello all, Need some help. I want to run the following: volume snapshot show -fields create-time, size, state, is-constituent Using the Ontap Powershell and redirect it to a local Excel format. I can get connected to my Clusters using the Connect-NcController, just cannot get the syntax correct for the volume command. Any help would be great.
... View more
When I use powershell to remove port from Default Broadcast Domain, it show me an error message But I can do the same thing in ontap cli Is any thing I miss in powershell environment? Thanks
... View more
In the past, I've used Invoke-NcSSH to administer Ontap clusters from a central location. i.e. I could pull the aggregate list from a cluster using a command like this: Invoke-NcSSH -Controller ClusterName -Command "aggr show" I also created a function to make the command shorter and allow me to run any OnTap CLI command on any cluster from a PowerShell window. The problem is that it requires Putty >0.70 to be installed (no big deal), but it's really really slow. I thought that Posh-SSH might work better, but you first have to establish a session, find the session ID, invoke a session to that session ID, then parse the output to get the data that I need. This is what a Posh-SSH session looks like to do the same as what I'm doing with Invoke-NcSSH: New-SSHSession -ComputerName ClusterName Get-SSHSession $var = Invoke-SSHCommand -SessionId 0 -Command "aggr show" $var.Output Does anyone have any fancy ways to make Posh-SSH work more like the way I was using Invoke-NcSSH above? Essentially, I'd like to be able to run an OnTap CLI command from PowerShell using a single PS command. Thanks in advance for any hints anyone can give me!
... View more