agowa338
Goto Top

PowerShell Choice Automatisieren

Hallo,

Ich habe hier ein als dll vorliegendes proprietäres cmdlet.
Das Problem ist, ein Kommando blockiert mein Skript, weil es auf eine Benutzereingabe wartet.
Weiß jemand, wie ich das Automatisieren kann?

Das cmdlet hat zwar einen Parameter "-confirm" welcher mit dem Satz "Wenn dieser Parameter gesetzt ist, wird zur Bestätigung aufgefordert" dokumentiert ist.
Leider bewirkt das weglassen dieses Parameters nichts. Es fordert leider trotzdem zur Bestätigung auf.
Kurz, das cmdlet hat einen Bug in Bezug auf den "-confirm" Parameter.
Gibt es irgendeine Möglichkeit, das mittels PowerShell zu umgehen, ohne den Quelltext bearbeiten zu müssen?

Content-Key: 307786

Url: https://administrator.de/contentid/307786

Printed on: April 25, 2024 at 15:04 o'clock

Mitglied: 129813
Solution 129813 Jun 21, 2016 updated at 18:31:04 (UTC)
Goto Top
Hi,
normally if there is a confirm parameter you set it like this to suppress the confirmation
-confirm:$false
Or is it a switch parameter ?

In other cmdlets the parameter
-force
suppresses user confirmation.

Why are you not telling us which dll you are using?

Regards
Member: agowa338
agowa338 Jun 21, 2016 updated at 18:44:31 (UTC)
Goto Top
This cmdlet doesn't have a "-force" switch, but I'll try the "-confirm:$false" switch tomorrow.

It's documented as:
-Confirm
    Prompts you for confirmation before executing the command.

    Erforderlich?                false
    Position?                    named
    Standardwert
    Pipelineeingaben akzeptieren?false
    Platzhalterzeichen akzeptieren?false

I'm trying to use the "Remove-VBRBackup" cmdlet from Veeam Backup and Replications