Help request!

Welcome Forums General PowerShell Q&A Help request!

This topic contains 4 replies, has 3 voices, and was last updated by

1 year, 3 months ago.

  • Author
  • #83342

    Points: 0
    Rank: Member

    Hello All,

    I am new to powershell sripting, required little help solving a requirement, Can anyone help me with a powershell script in getting the latest build artifact from bamboo server & download the same?

    Thanks a lot!

  • #83362

    Points: 0
    Rank: Member

    Can anyone guide me with the below error,

    Curl : Chunked encoding must be set via the SendChunked property.
    Parameter name: value
    At C:\test.ps1:12 char:1
    + Curl -Uri $artifacts -WebSession $TeamCitySession -TransferEncoding "chunked" -O ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

    How to set the sendChunked property ??

  • #83366

    Points: 1
    Rank: Member

    Can't say what that could be related to, but in powershell the "curl" command is actually an alias for "Invoke-WebRequest". So you can run this to get the documentation for that command. There might be something in there that helps you out.

    get-help Invoke-WebRequest
  • #83374

    Points: 0
    Rank: Member

    Thanks Jeremy for your kind response.

    I was getting outofmemory error while downloading a big artifact file(3GB) from bamboo.I am trying to resolve the outofmemory

    Invoke-WebRequest : Exception of type 'System.OutOfMemoryException' was thrown.
    At C:\test.ps1:7 char:1
    + Invoke-WebRequest -Uri $artifacts -WebSession $TeamCitySession -OutFile "C:\tem ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], OutOfMemoryException
    + FullyQualifiedErrorId : System.OutOfMemoryException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

    tried setting powershell memory to higher value set-item wsman:localhost\shell\maxmemorypershellmb 1000000 . however, it is not helping me.

    Can you or anyone in the forum can suggest me any workaround to it. It will make life easy, help much appreciated.

  • #83422

    Points: 790
    Helping Hand
    Rank: Major Contributor

    You want to ensure that you are using the right tool for the right job.

    For example, see these to references:

The topic ‘Help request!’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort