<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx</link><description>Here is a script to quickly create and delete queues. This was based out of this post . Usage :
 CreateQueue.ps1 &amp;lt;-c,d&amp;gt; &amp;lt;queuename&amp;gt; &amp;lt;Y/N - Private&amp;gt; &amp;lt;user&amp;gt; &amp;lt;all:restricted Permission&amp;gt; [T:Transactional]</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10367319</link><pubDate>Fri, 09 Nov 2012 19:55:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10367319</guid><dc:creator>McComas</dc:creator><description>&lt;p&gt;Is there a way to set permissions for more than one group, and get more granular than just &amp;quot;all&amp;quot;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10367319" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10341161</link><pubDate>Fri, 17 Aug 2012 22:34:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10341161</guid><dc:creator>Jason Landstrom1</dc:creator><description>&lt;p&gt;This post is for others that need an example like myself :)&lt;/p&gt;
&lt;p&gt;-c = create&lt;/p&gt;
&lt;p&gt;myQ = the queue name&lt;/p&gt;
&lt;p&gt;n = not private&lt;/p&gt;
&lt;p&gt;everyone = the user or group name&lt;/p&gt;
&lt;p&gt;all = gives that user all permissions&lt;/p&gt;
&lt;p&gt;T = will make it transactional&lt;/p&gt;
&lt;p&gt;.\createqueue.ps1 -c csrtofe n everyone all T&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10341161" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10286618</link><pubDate>Thu, 22 Mar 2012 22:13:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10286618</guid><dc:creator>terra</dc:creator><description>&lt;p&gt;Can you modify it so it will import queue names from a txt file?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10286618" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10165933</link><pubDate>Wed, 18 May 2011 16:53:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10165933</guid><dc:creator>bendy</dc:creator><description>&lt;p&gt;I used this to perform a server migration. I exported the queue list (several hundred queues) from Computer Management and then used a batch script to call this Powershell script to create that list of queues on the new box. You saved me hours of time and possible human error in the manually entry. Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10165933" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10141981</link><pubDate>Wed, 16 Mar 2011 12:30:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10141981</guid><dc:creator>Md Gouse</dc:creator><description>&lt;p&gt;Hi Sajay,&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I have written a simple script using PSCX 2.0 to create Private MSMQ in windows but I am not able to add a label to the same. Find the script below :&lt;/p&gt;
&lt;p&gt;New-MSMQueue -QueueName scheduler.q -Private&lt;/p&gt;
&lt;p&gt;Any help????&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10141981" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10081259</link><pubDate>Tue, 26 Oct 2010 23:43:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10081259</guid><dc:creator>greatc</dc:creator><description>&lt;p&gt;Here is the correct 1:&lt;/p&gt;
&lt;p&gt;$qb = [System.Messaging.MessageQueue]::Exists($queuename)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if($qb -ne $null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Write-Host &amp;quot;Alread have &amp;quot; $queuename &amp;quot;queue.&amp;quot;&lt;/p&gt;
&lt;p&gt;	exit&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$qb = [System.Messaging.MessageQueue]::Create($queuename, $transactional) &lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10081259" width="1" height="1"&gt;</description></item><item><title>re: Powershell Script to create an MSMQ</title><link>http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx#10081247</link><pubDate>Tue, 26 Oct 2010 23:20:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10081247</guid><dc:creator>greatc</dc:creator><description>&lt;p&gt;Nice Sajay.&lt;/p&gt;
&lt;p&gt;It&amp;#39;ll be good to check the existance of Queue before we create Queue:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$qb = [System.Messaging.MessageQueue]::Exists($queuename)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if($qb ! $null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$qb = [System.Messaging.MessageQueue]::Create($queuename, $transactional) &lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if syntax is correct or not, but you can correct it and add to the script.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10081247" width="1" height="1"&gt;</description></item></channel></rss>