search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting MSSQL Server Resource Pools via PowerShell
Posted in Windows Powershell | No Comment | 2,126 views | 24/04/2016 23:25

You can get detailed info about SQL Server Resource Pools via following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Resource Pools
$MSSQLResourcePool = @($MSSQLServerManager.ResourceGovernor.ResourcePools)[0]
 
# Get SQL Resource Pools Properties
$HostSQLResourcePoolName = $MSSQLResourcePool.Name;
$HostSQLMaximumCpuPercentage = $MSSQLResourcePool.MaximumCpuPercentage;
$HostSQLMaximumIopsPerVolume = $MSSQLResourcePool.MaximumIopsPerVolume;
$HostSQLMaximumMemoryPercentage = $MSSQLResourcePool.MaximumMemoryPercentage;
$HostSQLMinimumCpuPercentage = $MSSQLResourcePool.MinimumCpuPercentage;
$HostSQLMinimumIopsPerVolume = $MSSQLResourcePool.MinimumIopsPerVolume;
$HostSQLMinimumMemoryPercentage = $MSSQLResourcePool.MinimumMemoryPercentage;

You can also check other properties by listing all properties of $MSSQLResourcePool.



Leave a Reply