Hi Everyone
I'm trying to understand why I have these differences below:
1) When I ran this command from PowerCLI console "Get-ResourcePool 1_OVC01_GOLD". The result is :
2) When I ran the same command from a PS1 PowerShell Script, the result is different :
ParentId : ResourcePool-resgroup-411
Parent : Resources
CpuSharesLevel : Custom
NumCpuShares : 2000
CpuReservationMHz : 0
CpuExpandableReservation : True
CpuLimitMHz : -1
MemSharesLevel : Custom
NumMemShares : 2000
MemReservationMB : 1045
MemExpandableReservation : True
MemLimitMB : -1
Name : 1_OVC01_GOLD
CustomFields : {}
ExtensionData : VMware.Vim.ResourcePool
Id : ResourcePool-resgroup-3603
Uid : /VIServer=serv_vcadmin@am.lafargeone.net@amavcs01.am.lafargeone.net:443/ResourcePool=ResourcePool-resgroup-3603/
3) I would like to extract the values of NumCpuShares and NumMemShares on some output but the following comment doesn't work. Can someone explain me why ?
Get-ResourcePool 1_OVC01_GOLD | Select-String -pattern "NumCpuShares"
Get-ResourcePool 1_OVC01_GOLD | Select-String -pattern "NumMemShares"
Thanks for your help.
JEFF