Get MaxServerMemory from Get-SqlInstance

Hello,

Thanks for your time in reading my question. Appreciate it :slight_smile:

Q: In process of gathering data from various SQL instances to our Central collection server. Using SqlServer module to accomplish the task. However when tried to pull SQL Instance Configuration values using Get-SqlInstance resulted in blank for Max Memory value
Get-SqlInstance -ServerInstance TestServer | Select-Object @{n='CollectionDate';e={Get-Date -format d}} `</code></div> <div><code>,@{n='SqlInstance';e={$_.Name}} `
,ClusterName `</code></div> <div><code>,Collation `
,Edition `</code></div> <div><code>,HostPlatform `
,VersionString `</code></div> <div><code>,IsClustered `
,IsHadrEnabled `</code></div> <div><code>,NetName `
,InstanceName `</code></div> <div><code>,ServiceAccount `
,@{n='MaxMemoryInMB'; e={$_.Configuration.MaxServerMemory}} `
,Processors
if I save the server object to variable and use $var.Configuration.MaxServerMemory gives me output. How to achieve this in pipeline ?