Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Invoke-SSHCommand - Shutdown Befehl bestätigen

$
0
0

Hallo Zusammen,

ich schreibe grade ein Script, welches eine Fortigate Firewall runterfährt.

Wenn ich nun den Befehl starte:

Invoke-SSHCommand -SessionId 0 -Command "execute shutdown"


dann möchte die Fortigate dies bestätigt haben ("y/n"). Wie kann ich das machen?

Das hier:

Invoke-SSHCommand -SessionId 0 -Command "execute shutdown"

Invoke-SSHCommand -SessionId 0 -Command "y"

funktioniert nicht.

Danke schonmal & LG

Dabbel-Dei


Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>