Azure Storage account

Welcome Forums General PowerShell Q&A Azure Storage account

Viewing 1 reply thread
  • Author
    Posts
    • #193030
      Participant
      Topics: 1
      Replies: 0
      Points: 17
      Rank: Member

      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

       

      Ted

    • #193099
      Participant
      Topics: 10
      Replies: 1375
      Points: 1,481
      Helping Hand
      Rank: Community Hero

      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.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.