Microsoft Virtualization Discussions

Invoke-ncssh parsing problem?

koenraad0

Example to reproduce:
Invoke-NcSsh -Command 'system node run -node node1 -command "priv set diag;ls /etc/log;priv set admin"'
(Replace node1 with the name of a node)

 

Response:
Value        : Warning: These diagnostic commands are for use by NetApp
                        personnel only.


               Error: "ls" is not a recognized command
                 "priv set" is not supported: use the "set -privilege" command.

priv set diag --> runs on the node
ls /etc/log & priv set admin --> do not run on the node.

'system node run -node node1 -command "priv set diag;ls /etc/log;priv set admin"
This does work when run in a putty window.
I think it fails when you use ; to bundle commands to send to the node.

Another example:
Invoke-NcSsh -Command 'system node run -node ncb1-01 -command "hostname;hostname"'

Netapp PowerShell Toolkit 4.60
NetApp Release 9.3P5


2 REPLIES 2

markweber

try:

Invoke-NcSsh -Command 'set d;system node run -node node1 -command "ls /etc/log"'

 

 

(invoke-ncssh doesn't work for me right now, so i'm not able to test it)

koenraad0

Thanks, this solved the problem.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public