Switch Parameter on the -Whatif doesn’t seem to behave correctly?
If you set a switch to -switch:$False then that value should not execute, however in the case of -whatif, it shows the status “Getting the latest status of all resources…”.
It’s only the message that still shows, and it takes some extra time, however then it doesn’t actually give the whatif output.

Switch Parameter on the -Whatif doesn’t seem to behave correctly?
If you set a switch to -switch:$False then that value should not execute, however in the case of -whatif, it shows the status “Getting the latest status of all resources…”.
It’s only the message that still shows, and it takes some extra time, however then it doesn’t actually give the whatif output.