March | 2015 | I do stuff sometimes.

Ramblings about things.

Monthly Archives: March 2015

Get MSMQ (Message Queuing) queues with Powershell


Simple, yet effective. Especially if you don’t have the MSMQ module for PS. $queues = Get-WmiObject -computername “YourServer” Win32_PerfFormattedData_msmq_MSMQQueue $queues | ft -AutoSize -property Name,MessagesInQueue – F

Read More

Query MSSQL with Powershell


I often use different variety of this snippet to do stuff with MSSQL databases (and other types as well, with minor changes to the script). The script will use SQL Auth by default. To change this to Windows Auth, change the Connection String to: $SqlConnection.ConnectionString = “Server = $SQLServer; Database = $SQLDBname; Integrated Security =…

Read More

  • Archives