Need help with file not found error message.

  • Hello,

    I have googled this to high heaven, but it just leads me to references to the cmdlet. Can anyone point me in the right direction, please? I do not have the folder, but what do I need to do/install to get it?

    ErrorRecord      : Could not find file 'C:\windows\system32\Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageBlob'.
    WasThrownFromThrowStatement : False
    Message       : The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Could not find file
              'C:\windows\system32\Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageBlob'.
    Data        : {System.Management.Automation.Interpreter.InterpretedFrameInfo}
    InnerException     :
    TargetSite      : Void CheckActionPreference(System.Management.Automation.Language.FunctionContext, System.Exception)
    StackTrace      :  at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
               at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
               at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
               at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
               at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
               at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
               at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
              --- End of stack trace from previous location where exception was thrown ---
               at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
               at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
               at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
    HelpLink       :
    Source        : System.Management.Automation
    HResult       : -2146233087

  • As from this URL:  https://msdn.microsoft.com/en-us/library/azure/dn495240.aspx

    Azure is the Windows PowerShell module that you can use to control and automate the deployment and management of your workloads in Azure. Before you can start using the cmdlets, you'll need to download and install the module and establish a connection to your Azure account. For instructions, see How to install and configure Windows Azure PowerShell. To download the module, see the Downloads page.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Hello HanShi,

    Thank you for taking the time to reply, I went to the download page and installed Windows Powershell install, and for good measure the Storage Emulator. But I am still receiving the same error, the required folder does not exist on my machine. I just do not get this at all.

    Regards,
    D.

  • The issue I have is that although during debugging the Parameter value is correct, the script keeps looking at the local disk for the .json template.

    New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $HDIURI -TemplateParameterUri $HDIURI;

    $uatstgkey = (Get-AzureRmStorageAccountKey -ResourceGroupName "myresourcegroup" -Name "mystorageaccount").Value
    $context = New-AzureStorageContext -StorageAccountName "mystorageaccount" -StorageAccountKey $uatstgkey.GetValue(0)
    $sasToken = New-AzureStorageContainerSASToken -Name "containername" -Context $Context -Permission r -ExpiryTime ([DateTime]::Now.AddHours(1.0)) -FullUri
    $HDITemplate = Get-AzureStorageBlob -Blob "template.json" -Container "containername" -Context $Context
    $HDIParameters = Get-AzureStorageBlob -Blob "parameters.json" -Container "containername" -Context $Context
    $HDIURI = "https://mystorageaccount.blob.core.windows.net/input"

    Getting the following error:

    Error: Code=InvalidContentLink; Message=Unable to download deployment content from 'https://storageaccountname.blob.core.windows.net/containername/template.json'

    I just cant figure out why it cant download the .json files. This is driving me up the wall.

    Regards,
    Paul.

  • Duran - Thursday, February 22, 2018 9:36 PM

    The issue I have is that although during debugging the Parameter value is correct, the script keeps looking at the local disk for the .json template.

    New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $HDIURI -TemplateParameterUri $HDIURI;

    $uatstgkey = (Get-AzureRmStorageAccountKey -ResourceGroupName "myresourcegroup" -Name "mystorageaccount").Value
    $context = New-AzureStorageContext -StorageAccountName "mystorageaccount" -StorageAccountKey $uatstgkey.GetValue(0)
    $sasToken = New-AzureStorageContainerSASToken -Name "containername" -Context $Context -Permission r -ExpiryTime ([DateTime]::Now.AddHours(1.0)) -FullUri
    $HDITemplate = Get-AzureStorageBlob -Blob "template.json" -Container "containername" -Context $Context
    $HDIParameters = Get-AzureStorageBlob -Blob "parameters.json" -Container "containername" -Context $Context
    $HDIURI = "https://mystorageaccount.blob.core.windows.net/input"

    Getting the following error:

    Error: Code=InvalidContentLink; Message=Unable to download deployment content from 'https://storageaccountname.blob.core.windows.net/containername/template.json'

    I just cant figure out why it cant download the .json files. This is driving me up the wall.

    Regards,
    Paul.

    Two questions:
    Have you verified the content of the variables you've defined?
    Are you running the script in that order?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply