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.
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