Skip to content

Instantly share code, notes, and snippets.

namespace StuffOnAShelf
{
using System;
using System.IO;
using System.Timers;
using log4net;
using log4net.Config;
using Topshelf.Configuration.Dsl;
using Topshelf.Shelving;
@TravisTheTechie
TravisTheTechie / PwnQueues.ps1
Created February 11, 2010 19:30
Grants rights to a given user for queues matching the regex.
#GetQueueOwnership
param
(
[string] $queueNameRegex,
[string] $userName
)
[Void][System.Reflection.Assembly]::LoadWithPartialName("System.Messaging")
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("localhost") |
public interface IKeyedObject<T>
{
T Key { get; }
}