PowerCLI-Example-Scripts
PowerCLI-Example-Scripts copied to clipboard
Get-HVPoolSpec of manual pool does not include machine info
Describe the bug
Get-HVPoolSpec cmdlet run against manual pool returns no machines even though the pool contains machines.
[...]
"ManualDesktopSpec": {
"virtualCenterManagedCommonSettings": {
"TransparentPageSharingScope": "VM"
},
"userAssignment": {
"UserAssignment": "DEDICATED",
"AutomaticAssignment": true,
"AllowMultipleAssignments": false
},
"viewStorageAcceleratorSettings": {
"UseViewStorageAccelerator": false,
"ViewComposerDiskTypes": "OS_DISKS",
"RegenerateViewStorageAcceleratorDays": 7,
"BlackoutTimes": null
},
"source": "VIRTUAL_CENTER",
"virtualCenter": "anon.domain.com",
"machines": null <<<<<<<<<<<<<<<<<<
},
[...]
Reproduction steps
- Connect to HV-Server
- Run Get-HVPoolSpec against a manual pool that contains one or more machines.
- Inspect the "machines"-dictionary inside the spec returned by Get-HVPoolSpec
Expected behavior
The spec returned by Get-HVPoolSpec should contain information about the machines of the target pool.
The spec returned by Get-HVPoolSpec should be valid to use with New-HVPool -spec
Additional context
I understand that Get-HVPoolSpec should return a spec file that can be used with New-HVPool using the parameter -spec
The fact that the machines are not included in the spec file complicates migrations or easy recovery of desktop pool configurations using spec files.
New-HVPool accepts a spec file when the "machines"-dictionary is filled with information pulled with Get-HVMachineSummary.
I see no reason as to why the machines dictionary is empty when requesting a pool spec.