PowerShell is Microsoft's scripting language/shell that comes with Windows server and desktop per-installed nowadays. It has tight integration with the operating system and Microsoft's various server products. For automating tasks on Windows, it is a pretty compelling choice because of this bundling. PowerShell runs on Windows only, so it is not a good choice in doing cross-platform metrics data gathering and scripting. Below are scripts that should be scheduled as SQL Server Agent job steps to gather Windows server and SQL Server related metrics data. * [[windows:powershell:updatehost|Windows server info gathering]], assuming [[db:sqlserver:jimetrics|metrics database has been created]] and server Host table populated. * [[windows:powershell:insertstorage|Windows server disk metrics gathering]] * [[windows:powershell:insertinstance|SQL Server instance discovery]] * [[windows:powershell:updateinstance|SQL Server instance version/edition info and running status gathering]] * [[windows:powershell:insertinstanceconfig|SQL Server instance configuration gathering]] * [[windows:powershell:insertinstancedmvperfcounter|SQL Server instance performance counters gathering]] * [[windows:powershell:insertdbfilestats|SQL Server database file metrics gathering]] * [[windows:powershell:inserttablestats|SQL Server database table metrics gathering]]