New-MSMQueue

Topics: Developer Forum, User Forum
Mar 28 at 11:18 PM
Hello,
I am trying to migrate MSMQueues from one server to another.
I have used Get-MSMQueue to export all private queues along with their properties to a text file.
Is there a way to create all the same queues by having New-MSMQueue cmdlet to read from the text file?

Thank you for your time in advance.
Coordinator
Mar 28 at 11:23 PM
Can you post a snippet of the file so I can see the structure? Also, it might be easy to use Export-CliXml as that can then be imported with Import-CliXml and, in theory, we would have access to queue names and properties without having to resort to parsing a text file.
Mar 28 at 11:48 PM
r_keith_hill,

Thank you for your response.
a portion of the file looks like this:

AccessMode : SendAndReceive
Authenticate : False
BasePriority : 0
CanRead : True
CanWrite : True
Category : 00000000-0000-0000-0000-000000000000
CreateTime : 4/22/2013 6:16:44 PM
DefaultPropertiesToSend : System.Messaging.DefaultPropertiesToSend
DenySharedReceive : False
EncryptionRequired : Optional
FormatName : DIRECT=OS:my-msmq\private$\my_greatplainsservice
Formatter : System.Messaging.XmlMessageFormatter
Id : 00000000-0000-0000-0000-000000000000
Label : private$\my_GreatPlainsService
LastModifyTime : 1/10/2014 6:13:49 PM
MachineName : my_mq_name
MaximumJournalSize : 4294967295
MaximumQueueSize : 4294967295
MessageReadPropertyFilter : System.Messaging.MessagePropertyFilter
Path : FormatName:DIRECT=OS:my-msmq\private$\my_greatplainsservice
QueueName : private$\my_greatplainsservice
Transactional : True
UseJournalQueue : False
Visibility : Private

AccessMode : SendAndReceive
Authenticate : False
BasePriority : 0
CanRead : True
CanWrite : True
Category : 00000000-0000-0000-0000-000000000000
CreateTime : 4/22/2013 6:17:05 PM
DefaultPropertiesToSend : System.Messaging.DefaultPropertiesToSend
DenySharedReceive : False
EncryptionRequired : Optional
FormatName : DIRECT=OS:my-msmq\private$\my_greatplainsservicebroadcast
Formatter : System.Messaging.XmlMessageFormatter
Id : 00000000-0000-0000-0000-000000000000
Label : private$\my_GreatPlainsServiceBroadcast
LastModifyTime : 1/10/2014 6:14:27 PM
MachineName : my_mq_name
MaximumJournalSize : 4294967295
MaximumQueueSize : 4294967295
MessageReadPropertyFilter : System.Messaging.MessagePropertyFilter
Path : FormatName:DIRECT=OS:my-msmq\private$\my_greatplainsservicebroadcast
QueueName : private$\my_greatplainsservicebroadcast
Transactional : True
UseJournalQueue : False
Visibility : Private