<?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>How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx</link><description>Hey, Scripting Guy! How can I remove all the local printers from a computer? -- JW 
 Hey, JW. You did say that you wanted to do this only on computers running Windows XP or Windows Server 2003, didn’t you? You didn’t? Oh. Well, we’re going to pretend</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3476342</link><pubDate>Thu, 19 Jan 2012 19:33:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3476342</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Does anyone know why this script would work fine in windows 7, but give an error on the odjPrinter.Delete_ line when run under XP?&lt;/p&gt;
&lt;p&gt;The error says not found, the code is 80041002, and the source is SWbemObjectEx&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3476342" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3474271</link><pubDate>Fri, 06 Jan 2012 17:09:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3474271</guid><dc:creator>JMR360</dc:creator><description>&lt;p&gt;When i try and run the script using window 7 with PowerShell I get the following error message:&lt;/p&gt;
&lt;p&gt;Unexpected token &amp;#39;&amp;amp;&amp;#39; in expression or statement.&lt;/p&gt;
&lt;p&gt;At H:\MyScripts\printertest1.ps1:2 char:46&lt;/p&gt;
&lt;p&gt;+ Set objWMIService = GetObject(&amp;quot;winmgmts:\\&amp;quot; &amp;amp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;nbsp;strComputer &amp;amp; &amp;quot;\root\cimv2&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: ParserError: (&amp;amp;:String) [], ParseException&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : UnexpectedToken&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3474271" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3427924</link><pubDate>Tue, 10 May 2011 19:29:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3427924</guid><dc:creator>VulcanJedi</dc:creator><description>&lt;p&gt;For Each objPrinter in colInstalledPrinters&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if &amp;nbsp;not instr(1,objprinter.name,&amp;quot;pdf&amp;quot;,vbtextcompare) &amp;nbsp;then objPrinter.Delete_&lt;/p&gt;
&lt;p&gt;Next&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3427924" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3414890</link><pubDate>Tue, 22 Mar 2011 12:29:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3414890</guid><dc:creator>ImmI</dc:creator><description>&lt;p&gt;Hi its a great script, i have one puzzle&lt;/p&gt;
&lt;p&gt;I dont wants to delete the printer where port is like PDF%, how can i can incorporate this in the script so that it do not delete any printer whose port name contains PDF in it. because i wants to clean up all exept PDF printer.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3414890" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3392516</link><pubDate>Tue, 08 Mar 2011 15:22:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3392516</guid><dc:creator>Jareem Gamble</dc:creator><description>&lt;p&gt;Thanks man, I used this script with altiris. Works Great!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3392516" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3370446</link><pubDate>Mon, 22 Nov 2010 17:06:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3370446</guid><dc:creator>grim</dc:creator><description>&lt;p&gt;How would I put in an exception? Say I don&amp;#39;t want to delete the &amp;quot;AdobePDF&amp;quot; printer but I do want to delete all others.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3370446" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3352124</link><pubDate>Thu, 26 Aug 2010 08:52:59 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3352124</guid><dc:creator>Bigbash</dc:creator><description>&lt;p&gt;Kev it works, just tested it!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3352124" width="1" height="1"&gt;</description></item><item><title>re: How Can I Remove All the Local Printers from a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx#3347433</link><pubDate>Thu, 29 Jul 2010 09:33:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3347433</guid><dc:creator>KEV</dc:creator><description>&lt;p&gt;How do you do it on windows 7&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3347433" width="1" height="1"&gt;</description></item></channel></rss>