We are using Powershell Toolkit to automate various routine tasks across a large number of filers, including only 1 virtual filer (vfilerA). All is working fine. However, another virtual filer was recently added for support, and for some reason we are completely unable to get our script to work with this one. This virtual filer (vfilerB) is hosted within the same HA pair as vfilerA, but it's on the different node.
Whenever we are trying to connect to vfilerB by using Connect-NaController cmdlet, we are getting the following error which prevents the script from further execution:
Connect-NaController : API invoke failed.
+ $filer = Connect-NaController <<<< $filerip -Credential $FilerCred
+ CategoryInfo : InvalidResult: (IPADDRESS:NaController) [Connect-NaController], NaException
+ FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController
Sample script looks like below:
$secpasswd = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force
$FilerCred = New-Object System.Management.Automation.PSCredential ("USER", $secpasswd)
$filer = Connect-NaController $filerip -Credential $FilerCred
After this command we are getting the error for vfilerB, but script connects successfully when it is vfilerA. Credentials are valid and accepted by other toasters. Almost all options (including HTTPD) are identical on both virtual filers and HTTPD.ENABLE is on:
vfilerA@toaster1> options http
vfilerB@toaster2> options http
Data ONTAP 8.1.3P2 7-MODE
Windows Server 2008 R2
Powershell version is 2.0
Powershell Toolkit is the latest one
Where the problem for this issue might be and how can we resolve it?