Octopus-Cmdlets
Octopus-Cmdlets copied to clipboard
Errors in Get-Machine by -Name
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
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.
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.