I'm attending to write powershell script to do some automation and it works fine when executed, but when I put my script in a Function App (powershell)
I get this error:
ERROR: String '05/27/2021 00:01:38' was not recognized as a valid DateTime.
This error is thrown when executing command:
$snapshots = Get-AzWebAppSnapshot -ResourceGroupName $AppServicePlanResourceGroup -Name $WebAppName;
$AppServicePlanResourceGroup and $WebAppName have valid values.
My Function app settings:
Runtime version: ~3
Stack: PowesShell Core
PowerShell Core Version: PowerShell 7.0
Az Module Version: 'Az' = '6.*'