Month: February 2009

Scan network for instances of MS SQL with Powershell

Sal Young | February 24th, 2009


PROBLEM: You need to find out which computers and servers in my network have an instance of MS SQL installed. SOLUTION: In this solution we’ll create an instance of the Windows Management Instrumentation (WMI) for each computer in a list. We’ll then query the Win32_Service class for the existence of a service which name starts […]

Read More

How to Script Database Tables with PowerShell

Sal Young | February 20th, 2009


PROBLEM: I need an easy way to script out all the tables from a database in MS SQL 2000 and above. SOLUTION: Like anything in programming, there are a thousand ways to skin a cat. Here, I’ll show you the simplest way I found to meet this request. Go ahead and open a new session […]

Read More