Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Azure Modules to Automation #61

Open
sowens81 opened this issue Feb 11, 2020 · 0 comments
Open

Import Azure Modules to Automation #61

sowens81 opened this issue Feb 11, 2020 · 0 comments

Comments

@sowens81
Copy link

Need some help, this may not actually be a script issue.

the Following code errors when run in the script:

$ModuleContentUrl = (Invoke-WebRequest -Uri $ModuleContentUrl -MaximumRedirection 0 -UseBasicParsing -ErrorAction Ignore).Headers.Location

When it run's the parameter is set to the following:
$ModuleContentUrl = "https://www.powershellgallery.com/api/v2/package/Az.Automation/1.3.5"

And we get the following error:

Invoke-WebRequest : Object moved
Object moved to here.

At line:1 char:22

  • ... ntentUrl = (Invoke-WebRequest -Uri $ModuleContentUrl -MaximumRedirect ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (Method: GET, Reques\u2026PowerShell/6.2.3
    }:HttpRequestMessage) [Invoke-WebRequest], HttpResponseException
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Any guidance would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant