joel74 / POSH-LTM-Rest

PowerShell module and scripts for working with F5's LTM REST API
MIT License
78 stars 49 forks source link

Remove Function ask for User Input to confirm the action #193

Closed KlausBilger closed 5 years ago

KlausBilger commented 5 years ago

the remove function is always asking to "perform the Action". Remove-PoolMember -F5Session $session -PoolName "" -Partition "" -Name ""

Are you sure you want to perform this action? Performing the operation "Remove-PoolMember" on target . [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Yes"): Y

is there any way to use a Switch to override the question, otherwise this will not work in "silent mode"

klaus

pwahlmueller commented 5 years ago

You can surppress this with the parameter -Confirm:$false

so this should work: Remove-PoolMember -F5Session $session -PoolName "" -Partition "" -Name "" -confirm:$false

joel74 commented 5 years ago

Correct. This and other functions with ConfirmImpact="High"should prompt for confirmation unless "-confirm:$false" is explicitly passed in.

KlausBilger commented 5 years ago

Joel 74, many thanks for the detailed information. The functions are very helpful and save a lot of time - excellent work!

Thanks also to Patrick He is sitting in the office next to me.