I have one PowerShell Array called $vmSizelist whose member is as follows
TypeName : System.Management.Automation.PSCustomObject
Name : Equals
MemberType : Method
Definition : bool Equals(System.Object obj)
It contains the following items as shown below.
Name : VM1
VMSize : Standard_D2s_v3
ResourceGroup : RG1
Name : VM2
VMSize : Standard_D14_v2
ResourceGroup : RG2
I have got another object called $AllVMSize which contains the below list
Name NumberOfCores MemoryInMB MaxDataDiskCount OSDiskSizeInMB ResourceDiskSizeInMB
Standard_B1ls 1 512 2 1047552 4096
Standard_B1ms 1 2048 2 1047552 4096
Standard_B1s 1 1024 2 1047552 4096
Standard_B2ms 2 8192 4 1047552 16384
Standard_B2s 2 4096 4 1047552 8192
Standard_D2s_v3 2 8192 4 1047552 16384
Standard_D14_v2 16 114688 64 1047552 819200
The Get-Member shows below
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
MaxDataDiskCount Property System.Nullable[int] MaxDataDiskCount {get;set;}
MemoryInMB Property int MemoryInMB {get;set;}
Name Property string Name {get;set;}
NumberOfCores Property int NumberOfCores {get;set;}
OSDiskSizeInMB Property int OSDiskSizeInMB {get;set;}
RequestId Property string RequestId {get;set;}
ResourceDiskSizeInMB Property int ResourceDiskSizeInMB {get;set;}
StatusCode Property System.Net.HttpStatusCode StatusCode {get;set;}
I wanted to merge the the member in an array and the above PSObject and wanted to produce a 3rd PSObject/Array-like below:
Name VMSize ResourceGroup NumberOfCores MemoryInMB
VM1 Standard_D2s_v3 RG1 2 8192
VM2 Standard_D14_v2 RG2 16 114688