powershell:confirm
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
ronny:powershell:confirm [2015/02/27 10:06] – angelegt ronny | powershell:confirm [2015/03/17 14:39] – Seite von ronny:powershell:confirm nach powershell:confirm verschoben rldml | ||
---|---|---|---|
Zeile 15: | Zeile 15: | ||
But you can also configure the system to automatically confirm operations based upon their impact on the system. | But you can also configure the system to automatically confirm operations based upon their impact on the system. | ||
+ | < | ||
PS> Calc | PS> Calc | ||
PS> $ConfirmPreference=" | PS> $ConfirmPreference=" | ||
Zeile 33: | Zeile 34: | ||
PS> Stop-Process -ProcessName calc | PS> Stop-Process -ProcessName calc | ||
PS> | PS> | ||
+ | </ | ||
The default value of $ConfirmPreference is " | The default value of $ConfirmPreference is " | ||
Zeile 40: | Zeile 42: | ||
Jeffrey Snover [MSFT] | Jeffrey Snover [MSFT] | ||
Windows PowerShell/ | Windows PowerShell/ | ||
- | |||
- | |||
When confirmation is turned on by $ConfirmPreference, | When confirmation is turned on by $ConfirmPreference, | ||
+ | < | ||
PS> $ConfirmPreference=" | PS> $ConfirmPreference=" | ||
PS> stop-process -ProcessName calc -Confirm: | PS> stop-process -ProcessName calc -Confirm: | ||
Zeile 50: | Zeile 51: | ||
PS> stop-process -ProcessName calc | PS> stop-process -ProcessName calc | ||
PS> | PS> | ||
+ | </ | ||
Confirmation may cause your script to fail if it is running in a non-interactive environment, | Confirmation may cause your script to fail if it is running in a non-interactive environment, | ||
Zeile 55: | Zeile 57: | ||
Jon Newman [MSFT] | Jon Newman [MSFT] | ||
Windows PowerShell team | Windows PowerShell team | ||
+ | |||
+ | Link: http:// |
powershell/confirm.txt · Zuletzt geändert: 2016/04/02 00:48 von 127.0.0.1