Octopus-Cmdlets icon indicating copy to clipboard operation
Octopus-Cmdlets copied to clipboard

Add-octomachine erroring

Open AlexDBA012 opened this issue 6 years ago • 1 comments

Hi

These cmdlets are great but I'm having troubles with add-octomachine.

I’m running this line

Add-octoMachine -environment $environment -Name $Server -endpoint TentacleActive -Roles $roles

And getting this error

Add-OctoMachine : Cannot bind parameter 'Endpoint'. Cannot convert the "TentacleActive" value of type "System.String"

to type "Octopus.Client.Model.Endpoints.EndpointResource".

At C:\serverbuilds\OCTAddEnvironments.ps1:45 char:69

  • ... ironment $environment -Name $Server -endpoint TentacleActive -Roles ...

  • 
    
  • CategoryInfo : InvalidArgument: (:) [Add-OctoMachine], ParameterBindingException

  • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Octopus_Cmdlets.AddMachine

Any Ideas?

Cheers

AlexDBA012 avatar Aug 16 '18 12:08 AlexDBA012

You need to pass an EndpointResource object to the -Endpoint parameter. You would have to create an instance of PollingTentacleEndpointResource with New-Ojbect and then pass that as the parameter.

Swoogan avatar Sep 25 '18 15:09 Swoogan