Octopus-Cmdlets
Octopus-Cmdlets copied to clipboard
Add-octomachine erroring
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
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.