This post was originally published here

When migrating your BizTalk Server environment or deploy to a new or different environment, there are many different resources or configurations that you need to take into considerations like:

  • local queue creations
  • cloud queue creations
  • folder creations
  • and so on.

In this blog post, I will address how we can easily “export” a list of existing local private Message Queues (MSMQ) and recreate them, and set proper permissions in a different environment/server.

PowerShell script to extract a list of all private Message Queues (MSMQ) names

With this PowerShell sample, we will be able to extract a list of all private Message Queues (MSMQ) names to a CSV file to be used on a different script to deployed these resources on a different BizTalk Server environment.

set or update the URI (address) or part of the URI on a list of BizTalk Server Receive Locations deployed in your BizTalk Server environment.

Get-MsmqQueue -QueueType Private | 
Select-Object QueueName, Transactional, UseJournalQueue | 
Export-Csv -Path c:tempqueues.csv -Encoding ascii -NoTypeInformation

THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

You can download this script here: Extract a list of all Private Message Queuing (MSMQ) names to a CSV file with PowerShell

PowerShell script to create private Message Queues (MSMQ)

With this PowerShell sample, we will be able to create local Private Message Queues (MSMQ) and set proper permissions on a different BizTalk Server environment.

New-MsmqQueue -Name $queueName -Label $queueName -QueueType $queueType -Transactional | 
                Set-MsmqQueueAcl -UserName "Everyone" -Allow FullControl

THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

You can download this script here: Create local Private Message Queuing (MSMQ) and set proper permissions with PowerShell

The post Deploying local queues (MSMQ) with PowerShell appeared first on SANDRO PEREIRA BIZTALK BLOG.