Hallo zusammen,
ich möchte für nachfolgenden Befehl die Warn-Meldung unterdrücken:
Invoke-Command -ComputerName HostA.Domain.Local -ScriptBlock { $var = Read-Host "Passwort" -AsSecureString }
Meldung:
WARNING: A script or application on the remote computer A4TSQL111.A4T.LOCAL is sending a prompt request. When you are prompted, enter sensitive information, such as credentials or passwords, only if you trust the r emote computer and the application or script that is requesting the data.
Ich verstehe den Ursprung dieser Meldung und kann auch nachvollziehen, dass diese wichtig ist; allerdings stört sie im Script-Ablauf. Ich habe bereits mit -WarningAction SilentlyContinous und mit 3>$Null geteste, ich bekomme diese Meldung nicht unterdrückt.
Hat mir jemand hierzu einen Tipp?
Viele Grüße
Kai Koppelmann