Subscribe

Powershell Module DataONTAP on Windows Server 2016

Hello,

 

I've installed the Powershell Toolkit 4.4.0 on a Windows Server 2016 machine with Powershell 5.

After that I've importet the module and tryed to establish a connection:

 

~> Import-Module DataOntap
~> Connect-NaController myfiler.mydomain
Connect-NaController : Failed to load ntapadmin64 DLL
In Zeile:1 Zeichen:1
+ Connect-NaController myfiler.mydomain
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (myfiler.mydomain:NaController) [Connect-NaController], Exceptio
n
+ FullyQualifiedErrorId : RpcConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController

~>

 

It seems that there's a problem with ntapadmin64.dll. In the 32 bit Powershell its the same.

 

Any suggestions?

Re: Powershell Module DataONTAP on Windows Server 2016

Does this happen if you use an elevated PowerShell session?

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Powershell Module DataONTAP on Windows Server 2016

[ Edited ]

Yes its the same in elevated mode. And it happens on all Windows Server 2016 machines with this module installed,

Re: Powershell Module DataONTAP on Windows Server 2016

I might have a workaround, unless your use-case requires log-in via RPC for some reason. An important point to note is - logging in via RPC is supported only for 7-mode systems. Are you running a 7-mode or Clustered ONTAP?

 

If you don't need to log-in via RPC, run the command as `Connect-NaController yourController.yourDomain -Credential yourLogInUserName` and enter the password in the credentials dialog box when prompted. That should work without loading the ntapadmin64.dll.

 

If you're trying to script the commands, and want to avoid being prompted for password, you can run Add-NaCredential beforehand to store the credentials.

 

Or you can create a credential object in your script as

 

$secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)

and then run the command as

 

Connect-NaController yourController.yourDomain -Credential $mycreds

Hope this helps,

Aparajita

 

Re: Powershell Module DataONTAP on Windows Server 2016

Hello Aparajita,

 

and thanks a lot. We are running a 7-Mode Metrocluster but using Credentials from a encryptet file is ok.

 

Connecting to the Controller is now possible and I can do things like Get-NaVol but I have to do some operations on the mounted filer:

 

 

I've tryed to run a Mount-NaController. If I'm right it should be possible to do a

 

cd myfiler

 

after that but "myfiler" isn't found. It seems that the mountpoint is missing. This makes me courious if its a problem with Server 2016 or with the authentication method change.

Re: Powershell Module DataONTAP on Windows Server 2016

It might be a Windows-2016 problem - I remember there were some bugs reported on other cmdlets that perform disk operations (like the VM Conversion cmdlets), but nothing specific on Mount-NaController.

 

Would it be possible to try it out on an older version of Windows, with the changed authentication mechanism?

Re: Powershell Module DataONTAP on Windows Server 2016

Following your last request i found out that our old servers (Server 2012R2) still run with version 4.1.0 of the Powershell Toolkit.  With that I had some troubles using the credential authentication method so I tryed to update these servers to version 4.4.0 and there it was: The same DLL error as on our new 2016 servers.

Since the old servers are still productive I didn't bother to test if the credential authentication method and the mounting command work. I rolled back to version 4.1.0 as fast as possible.

 

After that I changed the version of the powershell toolkit on our new Windows Server 2016 Machines from 4.4.0 to 4.1.0. After that all of our scripts (using the rpc authentication method) started working again.

 

So my conclusion is that there are some bugs in verstion 4.4.0 of the toolkit. I can't say if the mounting problem is a new bug or if its related to the authentication method.

 

Thanks so much for your help!

 

 

Re: Powershell Module DataONTAP on Windows Server 2016

Thanks for taking the time and analyzing. I'll bring this bug-report to the attention of engineering - hopefully it can be fixed in a future release.

 

Cheers,

Aparajita