Get-DbaMemoryUsage
Get amount of memory in use by all SQL Server components and instances.
Retrieves the amount of memory per performance counter. Default output includes columns Server, counter instance, counter, number of pages, memory in KB, memory in MB
SSAS and SSIS are included.
SSRS does not have memory counters, only memory shrinks and memory pressure state.
This function requires local admin role on the targeted computers.
Screenshots
Examples
To return a custom object displaying Server, counter instance, counter, number of pages, memory in KB, memory in MB
Get-DbaMemoryUsage -ComputerName ServerA
To return a custom object with Server, counter instance, counter, number of pages, memory in KB, memory in MB
Get-DbaMemoryUsage -ComputerName ServerA\sql987 -Simple
To return a gridview displaying Server, counter instance, counter, number of pages, memory in KB, memory in MB
Get-DbaMemoryUsage -ComputerName ServerA\sql987 | Out-Gridview
Author
This command was created by Klaas Vandenberghe. You can find Klaas on Twitter and his blog.