When migrating your BizTalk Server environment or deploying 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.
📝 One-Minute Brief
Shows how to deploy local private MSMQ queues using PowerShell by exporting existing queues to a CSV file and recreating them with the correct transactional settings and permissions across BizTalk Server environments.
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 in a different script to deploy these resources on a different BizTalk Server environment.
Get-MsmqQueue -QueueType Private |
Select-Object QueueName, Transactional, UseJournalQueue |
Export-Csv -Path c:\temp\queues.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.
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.