Skip to content

Start-BitsTransfer cannot be leveraged in some instances #119

@nickhorvath

Description

@nickhorvath

in Install-UnitySetupInstance
the line
Start-BitsTransfer -Source $downloadSource -Destination $downloadDest

fails if it's executed from a Visual Studio Team Services build agent with as the VSTS Agent runs as a service.
2018-08-03T17:31:03.2273217Z DEBUG: 472+ >>>> Start-BitsTransfer -Source $downloadSource -Destination $downloadDest
2018-08-03T17:31:03.7159554Z Start-BitsTransfer : The operation being requested was not performed because the user has not logged on to the
2018-08-03T17:31:03.7159834Z network. The specified service does not exist. (Exception from HRESULT: 0x800704DD)
2018-08-03T17:31:03.7160174Z At C:\Program Files\WindowsPowerShell\Modules\UnitySetup\4.0.97\UnitySetup.psm1:472 char:13

Either credentials need to be supplied to the call (and piped through as params) or it should use webclient to download the installer
(New-Object System.Net.WebClient).DownloadFile([string]$downloadSource, [string]$downloadDest)

I'm testing this E2E now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions