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

Errors in Get-Machine by -Name

Open rohmcd opened this issue 8 years ago • 2 comments

I get the following error when using Get-Machine (I import using an 'Octo-' prefix) using MachineName. Using an Id works fine.

Get-OctoMachine -Id Machines-82 works fine.

Get-OctoMachine -Name 'Server1' gives:

Get-OctoMachine : Error converting value "CalamariNeedsUpgrade" to type 
'Octopus.Client.Model.MachineModelStatus'. Path 'Items[0].Status', line 22, position 39.
At line:1 char:1
+ Get-OctoMachine Server1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-OctoMachine], JsonSerializationException
    + FullyQualifiedErrorId : Newtonsoft.Json.JsonSerializationException,Octopus_Cmdlets.GetMachine

Ps: The PowerShell Gallery version is still 0.1.0

rohmcd avatar Jan 26 '17 02:01 rohmcd

I'm guess that the model in your Octopus version has changed versus the version I used to build the code. I will try upgrading. Then we can test to see if that works.

Swoogan avatar Jan 29 '17 21:01 Swoogan

I have upgraded to the client version 3.5.4 and released v0.3.1 as a zip (it's not on PSGet yet). I haven't tested because I'm having problems with SQL Server and the Octopus upgrade. However, you're welcome to download the update and see if it resolves your issue.

Swoogan avatar Mar 08 '17 03:03 Swoogan