Delete local file after upload to Azure
You seem to use $AzureDir
in one instance to hold all the blob infos, which is fine but then the line $FileInBackup= $AzureDir + $_.Name
seems to think $AzureDir
is a literal directory name.
It appears you need to rectify where the base directory is instead of $AzureDir
in those instances.