Ported from: https://github.com/Azure/Azure-Functions/issues/53
@ariel1974 asked:
When I'm trying to delete a file from a File storage account I'm getting this:
Exception while executing function: Functions.TimerTriggerPowerShell1. Microsoft.Azure.WebJobs.Script: PowerShell script error. System.Management.Automation: A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: Are you sure you want to perform this action?
Performing the operation "Remove-AzureStorageFile" on target "drawings/7.filtered.json".Any idea what I'm missing?
Hey @tohling, do you know how to write scripts that call commands that show prompts? Is there some way to suppress the prompt?
Try adding -Confirm:$false or -Force to the end of the command.
thank you very much @tohling , i'll try that and let you know. The weird part with this issue though, it doesn't happened in other storage account i've got, and the same script successfully deletes all files there.
Did that work?
Most helpful comment
Try adding -Confirm:$false or -Force to the end of the command.