Microsoft Virtualization Discussions

Invoke-ncssh parsing problem?

koenraad0
2,546 Views

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
2,499 Views

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
2,450 Views

Thanks, this solved the problem.

Public