Inventory is a vital information,whether you’re a consultant or an in-house DBA, you need to have a reliable inventory of the servers you manage.
Download the file and save as SSRSInventory.PS1.
It has five mandatory parameters
- InputFileName – Text File contains a list of SQL Servers -C:\Server.txt(Example)
- DirectoryToSave – Folder where you want to store the file
- ToID – to email Address
- FromID – From Email Address
- SMTP – SMTP Adress
Pre-requisites are -
- Windows PowerShell 2.0 must be installed
- Permission to access all SQL instances
- Permission to create a outputFile
Windows PowerShell 2.0 is installed by default on newer versions of the Windows operating systems.You must install a SQL Server feature that includes the SQL Server PowerShell (SQLPS) module and client libraries. The easiest way to do this is by installing SQL Server Management Studio, which includes the PowerShell feature and client libraries automatically. The SQL Server PowerShell (SQLPS) module contains the PowerShell providers and cmdlets for all SQL Server features.
Note: The code is tested on PowerShell 2.0 with 2005,2008, 2008 R2 SQL SSRS instances
The Excel sheet comprises following columns
- Name
- Domain Name
- OS
- DatabaseServerName
- CPU
- TotalRAM
- FreeRAM
- UsedRAM
- Version
- DatabaseName
- ExtendedProtectionLevel
- ExtendedProtectionScenario
- InstanceName
- SenderEmailAddress
- SendUsingSMTPServer
- ServiceName
- SMTPServer
- VirtualDirectoryReportManager
- VirtualDirectoryReportServer
- IsInitialized
- IsReportManagerEnabled
- IsSharePointIntegrated
- IsWebServiceEnabled
- IsWindowsServiceEnabled
- MachineAccountIdentity
- PathName
- SecureConnectionLevel
- WindowsServiceIdentityActual
- WindowsServiceIdentityConfigured
- ConnectionPoolSize
- DatabaseQueryTimeout
- Uptime
- IPAddress
PS C:\Blog> .\SSRSInventory.ps1 -InputFileName C:\server.txt -DirectoryToSaveTo C:\ -To pram@abc.com -From pram@abc.com -SMTP mail.abc.com