Closed chriswahl closed 8 years ago
I do like this! Two comments above and then I should be able to take it.
I did add the Apache-2.0 license since you created this PR. Please acknowledge here that you accept that license for your contribution.
Thanks!
@rnelson0 - Acknowledged and accepted. I'll work on the other discrepancies here shortly.
@rnelson0 - Took another stab at it. Let me know what you think. I left the vCenter portion in, since folks with multiple vCenters may appreciate being able to specify without having to pipe in something else. I'm on the fence about that - but this works as advertised now ;)
@chriswahl Thanks! This makes for a much nicer framework. I like the auto-connect option as-is, it can always be tuned later if there's demand. Merging.
I've created an "engine" of sorts named
Import-VIRole
. The idea is to supply three parameters - the name of the role, the path to a JSON file with permissions, and the vCenter Server - and the cmdlet will create the appropriate role. Roles would be saved as JSON files in the\Roles
folder.You can create the permission files by exporting from an existing role, or by adding the permissions to a simple JSON array.