This script can monitoring a SqlServer using MSSQL Querys. Example: “<PowershellPATH>powershell.exe” querysql.ps1 -H hostname(optional) -U username(optional) -P password(optional) -Q ‘MSSQL Query’ If you run as Administrator the...
indicates the percentage of times that the engine uses the disk cache front Module data SELECT CacheHitRatio FROM Win32_PerfRawData_MSSQL${dev/zSQLInstance}_MSSQL${dev/zSQLInstance}CacheManager WHERE Name=”_Total”
Number of user connections Module data SELECT UserConnections FROM Win32_PerfRawData_MSSQL${dev/zSQLInstance}_MSSQL${dev/zSQLInstance}GeneralStatistics