Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

$cluster.DrsAutomationLevel pulls in as an int #65

Closed
chriswahl opened this issue Nov 8, 2016 · 2 comments
Closed

$cluster.DrsAutomationLevel pulls in as an int #65

chriswahl opened this issue Nov 8, 2016 · 2 comments

Comments

@chriswahl
Copy link
Member

chriswahl commented Nov 8, 2016

For some interesting reason, the JSON file created by New-VesterConfig is generating an int value for drsmode (based on $cluster.DrsAutomationLevel). The value being pulled from vCenter is definitely FullyAutomated so I'm guessing the ConvertTo-Json cmdlet is to blame.

Can anyone else validate this behavior? Here's a snipet from my JSON config.

"cluster":  {
                    "drsmode":  1,
                    "drslevel":  3,
                    "haenable":  true

/cc @brianbunke @equelin

@brianbunke
Copy link
Contributor

Did replicate. This one is pretty lol.

PS C:\> (Get-Cluster).DrsAutomationLevel.GetType()

IsPublic IsSerial Name                                     BaseType                                                                                                      
-------- -------- ----                                     --------                                                                                                      
True     True     DrsAutomationLevel                       System.Enum

Fixed in commit 09714b1.

@chriswahl
Copy link
Member Author

Nice catch. :)

brianbunke added a commit that referenced this issue Nov 15, 2016
Fix stupid PowerCLI custom typing by presenting more items as strings (see also #65)
This was referenced Nov 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants