Skip to content

Does not work with multiple machine names #4

@JCanlett

Description

@JCanlett

Per the instructions, input machine names into the list.
Error @ runtime is

##[error]System.ArgumentException: One or more computer names are not valid. If you are trying to pass a URI, use the -ConnectionUri parameter, or pass URI objects instead of strings.

Looking at the PowerShell task I can verify that it would work if the parameters were passed in such a way

$machinesList = "Server1", "Server2"

$pass = ConvertTo-SecureString -AsPlainText $AdminPassword -Force

$credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $AdminUserName,$pass
$session = New-PSSession -ComputerName $machinesList -Credential $credential -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck)

But no matter how I format them in the list within Azure Devops it does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions