{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/475","labels_url":"https://api.github.com/repos/Azure/azure-powershell/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-powershell/issues/475/comments","events_url":"https://api.github.com/repos/Azure/azure-powershell/issues/475/events","html_url":"https://github.com/Azure/azure-powershell/issues/475","id":86558976,"number":475,"title":"use -confirm instead of \"-force\"","user":{"login":"trondhindenes","id":1747120,"avatar_url":"https://avatars.githubusercontent.com/u/1747120?v=3","gravatar_id":"","url":"https://api.github.com/users/trondhindenes","html_url":"https://github.com/trondhindenes","followers_url":"https://api.github.com/users/trondhindenes/followers","following_url":"https://api.github.com/users/trondhindenes/following{/other_user}","gists_url":"https://api.github.com/users/trondhindenes/gists{/gist_id}","starred_url":"https://api.github.com/users/trondhindenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trondhindenes/subscriptions","organizations_url":"https://api.github.com/users/trondhindenes/orgs","repos_url":"https://api.github.com/users/trondhindenes/repos","events_url":"https://api.github.com/users/trondhindenes/events{/privacy}","received_events_url":"https://api.github.com/users/trondhindenes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-06-09T11:15:16Z","updated_at":"2015-06-09T17:08:14Z","closed_at":null,"body":"The -\"confirm\" switch has alwas been meant as a way for a user to specify wether or not a cmdlet should prompt the user for confirmation. Throughout the azure cmdlets the \"-Force\" switch is used instead. Make sure the azure cmdlets stay \"true\" to PowerShell by using the \"confirm\" switch instead of \"force\".\n<!---@tfsbridge:{\"tfsId\":4144941}-->"},"comment":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/comments/110435783","html_url":"https://github.com/Azure/azure-powershell/issues/475#issuecomment-110435783","issue_url":"https://api.github.com/repos/Azure/azure-powershell/issues/475","id":110435783,"user":{"login":"Jaykul","id":192942,"avatar_url":"https://avatars.githubusercontent.com/u/192942?v=3","gravatar_id":"","url":"https://api.github.com/users/Jaykul","html_url":"https://github.com/Jaykul","followers_url":"https://api.github.com/users/Jaykul/followers","following_url":"https://api.github.com/users/Jaykul/following{/other_user}","gists_url":"https://api.github.com/users/Jaykul/gists{/gist_id}","starred_url":"https://api.github.com/users/Jaykul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jaykul/subscriptions","organizations_url":"https://api.github.com/users/Jaykul/orgs","repos_url":"https://api.github.com/users/Jaykul/repos","events_url":"https://api.github.com/users/Jaykul/events{/privacy}","received_events_url":"https://api.github.com/users/Jaykul/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T17:08:14Z","updated_at":"2015-06-09T17:08:14Z","body":"That cmdlet (for example) looks like it's just calling ConfirmAction in the base [AzurePSCmdlet](https://github.com/Azure/azure-powershell/blob/ae0983c74a9a3035af8df42ab8da995d544e53e8/src/Common/Commands.Common/AzurePSCmdlet.cs) class, which looks like this:\r\n\r\n```\r\n        protected void ConfirmAction(bool force, string actionMessage, string processMessage, string target, Action action)\r\n        {\r\n            if (force || ShouldContinue(actionMessage, \"\"))\r\n            {\r\n                if (ShouldProcess(target, processMessage))\r\n                {\r\n                    action();\r\n                }\r\n            }\r\n        }\r\n```\r\n\r\nCan I just say: _you got this inside out folks!_  It basically makes it so that **everything** that goes through here needs `-Force` to even see the ShouldProcess prompt. On top of that, they're not supporting the \"All\" options in ShouldContinue, so you presumably have to use -Force or be prompted for each item.  That's a mess.\r\n\r\nOf course, there's also [a \"custom\" implementation of ShouldProcess over here](https://github.com/Azure/azure-powershell/blob/7e051495ebb8a9f7613c932a8a91f80fed365763/src/ServiceManagement/Services/Commands.Utilities/Store/PowerShellCustomConfirmation.cs) so if they're using that, then it's wrong all over again in another way...."}}