I resolved this. It was my own fault. The token expired. Having said that I did notice additional issues and wanted to mention what I did to resolve them. It also appears from a performance perspective you want to use azcopy.exe copy command instead of sync. We have tens of thousand of small files. I also defined the parameter --overwrite ifsourcenewer
"The sync command identifies all files at the destination, and then compares file names and last modified timestamps before the starting the sync operation. If you have a large number of files, then you can improve performance by eliminating this up-front processing.
To accomplish this, use the azcopy copy command instead, and set the --overwrite
flag to ifSourceNewer
. AzCopy will compare files as they are copied without performing any up-front scans and comparisons. This provides a performance edge in cases where there are a large number of files to compare."
When using the Task Scheduler the network mapping (H:\test1) in the PS script would not run. It did work when manually running the script. To allow Task Scheduler to run the script correctly I needed to use a UNC path instead of the mapping. Because I changed to a copy command the path to Blob needed the test1 container removed. Not doing so created another test1 container in the test1 container. https://*.blob.core.windows.net/hannover/zkwnas2/