# Azure Storage account

**URL:** <https://forums.powershell.org/t/azure-storage-account/13536>\
**Category:** PowerShell Help\
**Created:** [December 12, 2019, 3:20am UTC](https://forums.powershell.org/t/azure-storage-account/13536 "2019-12-12T03:20:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![treichelt](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@treichelt](https://forums.powershell.org/u/treichelt)\
**Post date:** [December 12, 2019, 3:20am UTC](https://forums.powershell.org/t/azure-storage-account/13536/1 "2019-12-12T03:20:45Z")

</div>

i created a simple script that copies zip files from an azure vm to an azure storage account.

it then delete all files except the most recent 3 files from the storage account

the storage account is a file share that is mapped on the azure vm as y:

i can open the script and run it and it works fine.

i scheduled the script with task scheduler on that vm like many others i created but it never runs.

i found in the event viewer -\> powershell this error

Provider Health: Could not find the drive 'Y:'. The drive might not be ready or might not be mapped…

Details:  
ProviderName=Microsoft.PowerShell.Core\FileSystem  
ExceptionClass=DriveNotFoundException  
ErrorCategory=  
ErrorId=  
ErrorMessage=Could not find the drive 'Y:'. The drive might not be ready or might not be mapped.

Severity=Warning

SequenceNumber=33

I am not sure why the script can find the y: drive when i run it manually but not when run from the task scheduler.

the task runs with highest privileges and wether user is logged on or not

any help is greatly appreciated

&nbsp;

Ted

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [December 12, 2019, 9:50am UTC](https://forums.powershell.org/t/azure-storage-account/13536/2 "2019-12-12T09:50:14Z")

</div>

It is difficult assist you if you do not provide a script to troubleshoot. The best approach is adding logging to the script to get some verbose output when the script executes to troubleshoot.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:30pm UTC](https://forums.powershell.org/t/azure-storage-account/13536/3 "2024-05-16T20:30:55Z")

</div>


