This is a PowerShell script that puts out the XML required to update your Red…
Category: Powershell
PowerShell – Get All SQL Instances On Server
This script will return all SQL instances running on a server or list of servers….
PowerShell – Get “Logon As” Information From Remote (or local) Server
This was made possible by the Scripting Guy. I have boiled it down to the…
Restore All Databases With Most Recent Backup
This is a bit of a scary task. Someone tells you about 87 databases that…
PowerShell – List All Directories With Users Who Can Access
Maybe this is a one-off type of thing, but if you need to see every…
PowerShell – Getting All Running SQL Services
Getting all SQL Server services running on a server using PowerShell: Get-WmiObject -Class sqlservice -Namespace…
PowerShell – Making Arrays
The basics of creating a PowerShell array and working with it.
PowerShell – Find Active Node On Cluster
PowerShell script that prints out the state of the node you are on – Active or Passive.
PowerShell – Query Database Remotely
The basic syntax for sending a query to SQL Server using PowerShell. sqlcmd -S SERVER_NAME…