# Get MaxServerMemory from Get-SqlInstance

**URL:** <https://forums.powershell.org/t/get-maxservermemory-from-get-sqlinstance/14998>\
**Category:** PowerShell Help\
**Created:** [September 24, 2020, 9:03am UTC](https://forums.powershell.org/t/get-maxservermemory-from-get-sqlinstance/14998 "2020-09-24T09:03:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshavasa](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@harshavasa](https://forums.powershell.org/u/harshavasa)\
**Post date:** [September 24, 2020, 9:03am UTC](https://forums.powershell.org/t/get-maxservermemory-from-get-sqlinstance/14998/1 "2020-09-24T09:03:54Z")

</div>

Hello,

Thanks for your time in reading my question. Appreciate it 🙂

> 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 ?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:28pm UTC](https://forums.powershell.org/t/get-maxservermemory-from-get-sqlinstance/14998/2 "2024-05-16T20:28:50Z")

</div>

Closed on May 16, 2024, 8:28pm UTC


