Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.
sanderstad edited this page Aug 19, 2015 · 1 revision

Powershell is very good for retieving information from SQL Server. The problem is that most of the time we have to create the scripts everytime or load them from a previous file. Because I hate to do things twice I created a Powershell module for SQL Server which enables me to retrieve information from my instances with a few simple commands.

Is uses the SQL Server SMO for retrieving infirmation from SQL Server and uses the WMI to get information from the host.

Features

The library has the following features:

  • Get the host harddisk information
  • Get the host hardware
  • Get the host operating system information
  • Get the SQL Server instance settings
  • Get the SQL Server instance configuration settings
  • Get the SQL Server login server privileges
  • Get the SQL Server databases
  • Get the SQL Server database files
  • Get the SQL Server database users
  • Get the SQL Server database user privileges
  • Get the SQL Server Agent jobs

Installation

Unzip the zip file in the standard Powershell Module Directory %systemroot%\System32\WindowsPowerShell\v1.0\Modules so the psd1, psm1, ps1 files should be located here %systemroot%\System32\WindowsPowerShell\v1.0\Modules\PSSQLLib\

Clone this wiki locally