Microsoft Virtualization Discussions

Highlighted

Invoke-NcSsh complaining PuTTy not installed when executed from scheduled tasks

Hi all,

 

I have a .ps1 script that consists of a combination of PoSh cmdlets and Invoke-NcSsh. The script works as expected when it's executed from PoSh but throws errors saying "Error: Please install putty ( version putty-64bit-0.70(64bit) or putty-0.70-installer(32bit) ) on your machine to use this cmdlet.. Code: . Message: Unable to connect <cluster>" when the script is triggered from a scheduled task. 

 

PuTTy is installed and permissions of its registry key is configured as reported elsewhere in this forum. Does anyone else have this problem / knows how to rectify this?

 

Info:

Windows Server 2012 R2

PoSh 5.1.14409.1018

NetApp PoSh toolkit version 4.5.0

4 REPLIES 4
Highlighted

Re: Invoke-NcSsh complaining PuTTy not installed when executed from scheduled tasks

Hi,

 

There have been a number of issues with Invoke-NcSsh and Putty

 

https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-failing-with-ONTAP-9-3/td-p/137313/page/2 

 

 Have you considered using "Invoke-NcSystemApi" as an SSH replacement? What SSH commands are running in your script?

 

/Matt

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

Highlighted

Re: Invoke-NcSsh complaining PuTTy not installed when executed from scheduled tasks


@mbeattie wrote:

Hi,

 

There have been a number of issues with Invoke-NcSsh and Putty

 

https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-failing-with-ONTAP-9-3/td-p/137313/page/2 

 

 Have you considered using "Invoke-NcSystemApi" as an SSH replacement? What SSH commands are running in your script?

 

/Matt



Hi Matt,

 

Yeah I've considered using "Invoke-NcSystemApi" as an alternative but haven't got round to testing it. 

 

These are the "Invoke-NcSsh" commands I'm trying to run,

 

Invoke-NcSsh -Command "system timeout show"
Invoke-NcSsh -Command "security ssh show"
Invoke-NcSsh -Command "vserver services web show -ssl-only false -name spi"
Invoke-NcSsh -Command "vserver services web show -ssl-only false -name ontapi"
Invoke-NcSsh -Command "system services ndmp show"

 

I'll be more than happy to switch to their native cmdlets if one exists and if not, "Invoke-NcSystemApi" but I'll probably need some help with "Invoke-NcSystemApi".

Highlighted

Re: Invoke-NcSsh complaining PuTTy not installed when executed from scheduled tasks

have been using putty-64bit-0.70-installer.msi for NetApp_PowerShell_Toolkit_9.6.0.msi.

I also make the regestory change to Local Machine software\simontatham and Add the local User/ System Full Control in the permissions.

 

I find running powershell as administrator works well.

Highlighted

Re: Invoke-NcSsh complaining PuTTy not installed when executed from scheduled tasks

Thanks PhillipUdel but I have no problems with executing normally "Invoke-NcSsh" from a PoSh console. The problem only comes in when the command is executed from a scheduled task. 


@PhillipUdel wrote:

have been using putty-64bit-0.70-installer.msi for NetApp_PowerShell_Toolkit_9.6.0.msi.

I also make the regestory change to Local Machine software\simontatham and Add the local User/ System Full Control in the permissions.

 

I find running powershell as administrator works well.


 

Try the NEW Support Site!
NetApp Support Site
Forums