I use the PowerShell command line below to upload a file to a blob storage and overwrite if already exists:
Set-AzureStorageBlobContent -Confirm:$false -Force
It works well.
For another scenario, I need to do opposite and make sure Set-AzureStorageBlobContent
does not overwrite blobs if already exist.
I know that I can use the logic explained here:
How to check if a blob already exists in Azure blob container using PowerShell
However, I am hoping that there is a simpler option in PowerShell.
I expect there should be a way to auto-answer "No" to Powershell's -Confirm
prompt.
Is there any PowerShell technique that I can use here?