Azure File - Error Snapshot - PowerShell

Copper Contributor

Hi all,


I want to deploy an Azure File (Storage Account) and use it as a Shared Folder in my Windows 10, up here all right. I´ve created a Runbook to launch shares snapshot automatically everyday (PowerShell). The code used is:


$ctx=New-AzureStorageContext -ConnectionString $connectionstring
$share=Get-AzureStorageShare -Context $ctx -Name work


The Runbook ends with de next error: 


Method invocation failed because [Microsoft.WindowsAzure.Storage.File.CloudFileShare] does not contain a method named



This error is the same when trying these code in "Windows PowerShell ISE" client, but doesn´t appear in Cloud Shell (Azure Portal).


Please, somebody could help me?


Thanks in advance.


1 Reply

Try importing or updating Azure.Storage module in the automation account, that worked for me.  I'm running something similar to schedule snapshots