ONTAP Discussions

Invoke-NcSsh : Exception has been thrown by the target of an invocation (ISE vs POWERSHELL)

SOBOU
82 Views

Good day all.  I need to pick your brains for a second.

 

Import-Module DataONTAP

$StorageIP = "10.10.1.40"

$user = "Power"

Connect-NcController $StorageIP -Credential $user -ontapi
Invoke-NcSsh -Command 'set -confirmations off'

 

When running those in Powershell ISE, it works fine, but when running this in regular Powershell window, i get the "Invoke-NcSsh : Exception has been thrown by the target of an invocation"

 

I have already checked a couple things

Running this from a server 2022, got the latest ontap module 9.17, running against a 9.12 SAN. 

i have putty installed. Putty path is in the $env:path

.  Both instances of ISE and Powershell are run using regular user (not as admin)... Putty registry keys are present, etc.. 

When i type get-module, the only difference between both is the ISE module that is present in the ISE window.

 

Have you ever experienced this?

I have included a screenshot of both screens so you can see the results.  Obviously that is not all the script does, but it is stuck there atm.  

 

 

0 REPLIES 0
Public