<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx</link><description>*******Disclaimer. This posting contains scripting samples. These are
provided as-is with no guaranties or warranties of any kind. They are
not thoroughly tested in all scenarios. 
 Over the years, the Printing team has released a number of management</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3571915</link><pubDate>Fri, 10 May 2013 13:06:26 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3571915</guid><dc:creator>Premiquickprints</dc:creator><description>&lt;p&gt;we offered cheap and best high quality printing services like business card, gifts, T-shirts, mugs , stationary products, corporate products, etc. only at premiquickprints.com&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3571915" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3511656</link><pubDate>Tue, 31 Jul 2012 03:55:28 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3511656</guid><dc:creator>Shweta118</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need a script to change the printer settings mode to duplex or both sides. This will help me in saving paper, cause accidendly a couple of times I have sent the print job without changing the settings.&lt;/p&gt;
&lt;p&gt;Thanks in advance...&lt;/p&gt;
&lt;p&gt;-Shweta&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3511656" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3502614</link><pubDate>Thu, 07 Jun 2012 20:01:32 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3502614</guid><dc:creator>bdailey</dc:creator><description>&lt;p&gt;Justin - &lt;/p&gt;
&lt;p&gt;I get an error at the following line of your script:&lt;/p&gt;
&lt;p&gt;$q2 = New-Object System.Printing.PrintQueue $server,$q.Name,$queuePerms&lt;/p&gt;
&lt;p&gt;The error reads something like this:&lt;/p&gt;
&lt;p&gt;&amp;quot;Attempt by security transparent method &amp;#39;MS.Internal.PrintWin32Thunk.PrinterDefaults.Dispose(Boolean)&amp;#39; to access security critical method &amp;#39;MS.Internal.PrintWin32Thunk.PrinterDefaults.InternalDispose(Boolean)&amp;#39; failed.&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve googled this and found that it&amp;#39;s a known bug in the .NET v4.0 assembly System.Printing, and the workarounds I&amp;#39;ve found do not work for me... Any pointers?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brendan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3502614" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3489852</link><pubDate>Mon, 02 Apr 2012 20:15:47 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3489852</guid><dc:creator>Justin Hutchings [MSFT]</dc:creator><description>&lt;p&gt;Be sure to check out the new PowerShell scripts provided in Windows 8 Consumer preview for printer management. &lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/library/hh918357.aspx"&gt;technet.microsoft.com/.../hh918357.aspx&lt;/a&gt; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3489852" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3484299</link><pubDate>Fri, 02 Mar 2012 15:55:46 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3484299</guid><dc:creator>bodum1</dc:creator><description>&lt;p&gt;Can someone please provide assistance in adapting this script to check the Printer Driver version?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3484299" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3479891</link><pubDate>Thu, 09 Feb 2012 11:43:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3479891</guid><dc:creator> lucylitho</dc:creator><description>&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&amp;quot;http:// www.flyerprintersuk.com&amp;quot; &amp;nbsp;&amp;gt; flyer printers uk &amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;is a business leader in handling &amp;nbsp;any type of print projects for marketing needs. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our products are brochures, catalogs, postcards,&lt;/p&gt;
&lt;p&gt;Business cards, banners, plastic cards, leaflet , sticker etc. &lt;/p&gt;
&lt;p&gt;Affordability, high quality and fast turnarounds are our area of focus.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3479891" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3462921</link><pubDate>Wed, 02 Nov 2011 20:46:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3462921</guid><dc:creator>Print Blog</dc:creator><description>&lt;p&gt;Jeffrey, thanks a lot. &amp;nbsp;That is helpful content!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3462921" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3450492</link><pubDate>Wed, 31 Aug 2011 21:55:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3450492</guid><dc:creator>Jeffrey S. Patton</dc:creator><description>&lt;p&gt;I wrote up some stuff, hope you enjoy&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://gallery.technet.microsoft.com/scriptcenter/PrintServerManagementps1-7676ed28"&gt;gallery.technet.microsoft.com/.../PrintServerManagementps1-7676ed28&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3450492" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3449499</link><pubDate>Fri, 26 Aug 2011 20:42:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3449499</guid><dc:creator>Jeffrey S. Patton</dc:creator><description>&lt;p&gt;Nice post, I tweaked the code a bit so I could pull queues from my print server ps but am getting an error.&lt;/p&gt;
&lt;p&gt;$host.Runspace.ThreadOptions = &amp;quot;ReuseThread&amp;quot;&lt;/p&gt;
&lt;p&gt;Add-Type -AssemblyName System.Printing&lt;/p&gt;
&lt;p&gt;$server = new-object System.Printing.PrintServer(&amp;quot;\\ps&amp;quot;)&lt;/p&gt;
&lt;p&gt;$queues = $server.GetPrintQueues(@([System.Printing.EnumeratedPrintQueueTypes]::Shared))&lt;/p&gt;
&lt;p&gt;Error:&lt;/p&gt;
&lt;p&gt;Add-Type : Length cannot be less than zero.&lt;/p&gt;
&lt;p&gt;Parameter name: length&lt;/p&gt;
&lt;p&gt;At line:1 char:9&lt;/p&gt;
&lt;p&gt;+ Add-Type &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;nbsp;-AssemblyName System.Printing&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: NotSpecified: (:) [Add-Type], ArgumentOutOfRangeException&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : System.ArgumentOutOfRangeException,Microsoft.PowerShell.Commands.AddTypeCommand&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running this on windows 7 x64 enterprise. I have all the rsat tools installed, but I figure I must be missing something.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3449499" width="1" height="1"&gt;</description></item><item><title>re: Printer Management Using PowerShell</title><link>http://blogs.technet.com/b/print/archive/2009/10/16/printer-management-using-powershell.aspx#3428312</link><pubDate>Wed, 11 May 2011 20:31:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3428312</guid><dc:creator>JoshGav</dc:creator><description>&lt;p&gt;The scripts in this post are a good start, but I couldn&amp;#39;t actually make things work till I did the following:&lt;/p&gt;
&lt;p&gt;$host.Runspace.ThreadOptions = &amp;quot;ReuseThread&amp;quot;&lt;/p&gt;
&lt;p&gt;Add-Type -AssemblyName System.Printing&lt;/p&gt;
&lt;p&gt;$permAdminServer = ([System.Printing.PrintSystemDesiredAccess] &amp;quot;AdministrateServer&amp;quot;)&lt;/p&gt;
&lt;p&gt;$permAdminPrinter = ([System.Printing.PrintSystemDesiredAccess] &amp;quot;AdministratePrinter&amp;quot;)&lt;/p&gt;
&lt;p&gt;$ps = New-Object System.Printing.LocalPrintServer $permAdminServer&lt;/p&gt;
&lt;p&gt;$queue = $ps.GetPrintQueues() | Select-Object -Last 1&lt;/p&gt;
&lt;p&gt;$queue2 = New-Object System.Printing.PrintQueue $ps,$queue.Name,$permAdminPrinter&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3428312" width="1" height="1"&gt;</description></item></channel></rss>