Hello,
I try to execute a command via NcSsh for downloading shelf and other firmware on several clusters.
When I copy the command which the WFA creates to the commandline of a system it is working.
Here is the code:
param (
[parameter(Mandatory=$true, HelpMessage="Cluster Name")]
[string]$ClusterName,
[parameter(Mandatory=$true, HelpMessage="Source of package")]
[string]$Source
)
Get-WFALogger -Info -message $("Downloading shelf update to Cluster: $ClusterName")
#Define download path
if ($Source -eq "FRD"){
$DownloadPath = "http://<ip>/all_shelf_fw.zip"
}elseif ($Source -eq "NRT"){
$DownloadPath = "another path"
}
Connect-WfaCluster -Node $ClusterName -ErrorAction stop
$clusternodes = Get-NcClusterNode -ErrorAction stop
Get-WFALogger -Info -message $("Will download shelf package from $DownloadPath to cluster $ClusterName.")
foreach($node in $clusternodes.NodeName){
Get-WFALogger -Info -message $("Will download shelf package to Node $node on cluster $ClusterName.")
Invoke-NcSsh "set -privilege advanced -confirmations off; storage firmware download -node $node -package-url $DownloadPath" -ErrorAction stop
Get-WFALogger -Info -message $("Shelf package download to Node $node on cluster $ClusterName done.")
}
Get-WFALogger -Info -message $("Shelf update package downloaded to cluster $ClusterName.")
In another command I download the Ontap package to the system, that works because there is a cmdlet available.
Any idea I do wrong?
WFA: 4.0
Ontap:8.3.2P4
Regards
Matthias