Skip to content

Instantly share code, notes, and snippets.

Kent Nordström KentNordstrom

View GitHub Profile
@rberrelleza
rberrelleza / UseServiceBusFromPowershell.ps1
Created Mar 27, 2012
Send and receive messages to a Service Bus queue via PowerShell
View UseServiceBusFromPowershell.ps1
Import-Module "PATH_TO_Microsoft.ServiceBus.dll"
#Create the required credentials
$tokenProvider = [Microsoft.ServiceBus.TokenProvider]::CreateSharedSecretTokenProvider("owner", "YOUR_ISSUERSECRET")
$namespaceUri = [Microsoft.ServiceBus.ServiceBusEnvironment]::CreateServiceUri("sb", "YOUR_NAMESPACE", "");
$namespaceManager = New-Object Microsoft.ServiceBus.NamespaceManager $namespaceUri,$tokenProvider
#Create a queue
$queue = $namespaceManager.CreateQueue("MyPowershellQueue");
You can’t perform that action at this time.