<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Bulk-create printer objects on print servers using Windows PowerShell</title>
	<atom:link href="http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/</link>
	<description>On Windows PowerShell and other admin-related topics</description>
	<lastBuildDate>Fri, 09 Dec 2011 10:08:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Andreas</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-950</link>
		<dc:creator><![CDATA[Andreas]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 13:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-950</guid>
		<description><![CDATA[Now, I haven&#039;t tested it myself yet, but it try: 
$print.DoCompleteFirst = $true]]></description>
		<content:encoded><![CDATA[<p>Now, I haven&#8217;t tested it myself yet, but it try:<br />
$print.DoCompleteFirst = $true</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-949</link>
		<dc:creator><![CDATA[Andreas]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 13:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-949</guid>
		<description><![CDATA[Take a look at this document: 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394363(v=vs.85).aspx

There&#039;s a value for &quot;Start jobs that are finished spooling first.&quot;: 
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST]]></description>
		<content:encoded><![CDATA[<p>Take a look at this document:<br />
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394363(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa394363(v=vs.85).aspx</a></p>
<p>There&#8217;s a value for &#8220;Start jobs that are finished spooling first.&#8221;:<br />
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-948</link>
		<dc:creator><![CDATA[Andreas]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 09:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-948</guid>
		<description><![CDATA[You don&#039;t say what you need help with.. But perhaps adding quotes around &quot;BCP/Interactive&quot; will do the trick. Also the function is still expecting the server name to be passed to it as an argument, even though you&#039;ve &quot;hard coded&quot; the rest of the information.]]></description>
		<content:encoded><![CDATA[<p>You don&#8217;t say what you need help with.. But perhaps adding quotes around &#8220;BCP/Interactive&#8221; will do the trick. Also the function is still expecting the server name to be passed to it as an argument, even though you&#8217;ve &#8220;hard coded&#8221; the rest of the information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve88</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-934</link>
		<dc:creator><![CDATA[steve88]]></dc:creator>
		<pubDate>Sun, 02 Oct 2011 12:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-934</guid>
		<description><![CDATA[works for me: server 2008 r2

function CreatePrinter {
$server = $args[0]
$print = ([WMICLASS]“\\.\ROOT\cimv2:Win32_Printer”).createInstance() 
$print.drivername = $args[1]
$print.PortName = $args[2]
$print.Shared = $true
$print.Published = $true
$print.Sharename = $args[3]
$print.Location = $args[4]
$print.Comment = $args[5]
$print.DeviceID = $args[6]
$print.Put() 
}

function CreatePrinterPort {
$server =  $args[0] 
$port = ([WMICLASS]&quot;\\.\ROOT\cimv2:Win32_TCPIPPrinterPort&quot;).createInstance() 
$port.Name= $args[1]
$port.SNMPEnabled=$false 
$port.Protocol=1 
$port.HostAddress= $args[2] 
$port.Put() 
}

$printers = Import-Csv &quot;printers.csv&quot; 

foreach ($printer in $printers) {
CreatePrinterPort $printer.Printserver $printer.Portname $printer.IPAddress
CreatePrinter $printer.Printserver $printer.Driver $printer.Portname $printer.Sharename $printer.Location $printer.Comment $printer.Printername
}


csv tabs:

Printserver,Driver,Portname,IPAddress,Sharename,Location,Comment,Printername]]></description>
		<content:encoded><![CDATA[<p>works for me: server 2008 r2</p>
<p>function CreatePrinter {<br />
$server = $args[0]<br />
$print = ([WMICLASS]“\\.\ROOT\cimv2:Win32_Printer”).createInstance()<br />
$print.drivername = $args[1]<br />
$print.PortName = $args[2]<br />
$print.Shared = $true<br />
$print.Published = $true<br />
$print.Sharename = $args[3]<br />
$print.Location = $args[4]<br />
$print.Comment = $args[5]<br />
$print.DeviceID = $args[6]<br />
$print.Put()<br />
}</p>
<p>function CreatePrinterPort {<br />
$server =  $args[0]<br />
$port = ([WMICLASS]&#8220;\\.\ROOT\cimv2:Win32_TCPIPPrinterPort&#8221;).createInstance()<br />
$port.Name= $args[1]<br />
$port.SNMPEnabled=$false<br />
$port.Protocol=1<br />
$port.HostAddress= $args[2]<br />
$port.Put()<br />
}</p>
<p>$printers = Import-Csv &#8220;printers.csv&#8221; </p>
<p>foreach ($printer in $printers) {<br />
CreatePrinterPort $printer.Printserver $printer.Portname $printer.IPAddress<br />
CreatePrinter $printer.Printserver $printer.Driver $printer.Portname $printer.Sharename $printer.Location $printer.Comment $printer.Printername<br />
}</p>
<p>csv tabs:</p>
<p>Printserver,Driver,Portname,IPAddress,Sharename,Location,Comment,Printername</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-904</link>
		<dc:creator><![CDATA[Marc]]></dc:creator>
		<pubDate>Mon, 26 Sep 2011 03:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-904</guid>
		<description><![CDATA[Hi guys 

I am, having troubles.   Help please 
function CreatePrinter {
$server = $args[0]
$print = ([WMICLASS]&quot;\\$server\ROOT\cimv2:Win32_Printer&quot;).createInstance() 
$print.drivername = &quot;Lexmark Universal PS3&quot; 
$print.PortName = &quot;172.30.29.58&quot;
$print.Shared = $true
$print.Sharename = &quot;BNEBCP_HP4250_2&quot;
$print.Location = BCP/Interactive
$print.Comment = &quot;Lexmark Universal PS3&quot;
$print.DeviceID = &quot;BNEBCP_HP4250_2&quot;
$print.Put() 
}]]></description>
		<content:encoded><![CDATA[<p>Hi guys </p>
<p>I am, having troubles.   Help please<br />
function CreatePrinter {<br />
$server = $args[0]<br />
$print = ([WMICLASS]&#8220;\\$server\ROOT\cimv2:Win32_Printer&#8221;).createInstance()<br />
$print.drivername = &#8220;Lexmark Universal PS3&#8243;<br />
$print.PortName = &#8220;172.30.29.58&#8243;<br />
$print.Shared = $true<br />
$print.Sharename = &#8220;BNEBCP_HP4250_2&#8243;<br />
$print.Location = BCP/Interactive<br />
$print.Comment = &#8220;Lexmark Universal PS3&#8243;<br />
$print.DeviceID = &#8220;BNEBCP_HP4250_2&#8243;<br />
$print.Put()<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kosmito</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-887</link>
		<dc:creator><![CDATA[kosmito]]></dc:creator>
		<pubDate>Thu, 22 Sep 2011 12:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-887</guid>
		<description><![CDATA[Hi, script worked ok, but how to set &quot;Print spooled documents first&quot; too? When you created printer by wizard it&#039;s set by default, but by script is unchecked.]]></description>
		<content:encoded><![CDATA[<p>Hi, script worked ok, but how to set &#8220;Print spooled documents first&#8221; too? When you created printer by wizard it&#8217;s set by default, but by script is unchecked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-829</link>
		<dc:creator><![CDATA[Larry]]></dc:creator>
		<pubDate>Tue, 09 Aug 2011 23:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-829</guid>
		<description><![CDATA[I have used this script in the past on a Windows 2008 R2 and it has worked...however all printers were configured with their IP address...We have a new site and i was trying to configure the print server before the printers were moved to the site when i run the script it creates one print queue/port and gets stuck....I am a power shell noob....i know the script is waiting for a response from the printer but it’s not there...can anyone offer any advice]]></description>
		<content:encoded><![CDATA[<p>I have used this script in the past on a Windows 2008 R2 and it has worked&#8230;however all printers were configured with their IP address&#8230;We have a new site and i was trying to configure the print server before the printers were moved to the site when i run the script it creates one print queue/port and gets stuck&#8230;.I am a power shell noob&#8230;.i know the script is waiting for a response from the printer but it’s not there&#8230;can anyone offer any advice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-810</link>
		<dc:creator><![CDATA[Peter]]></dc:creator>
		<pubDate>Sun, 31 Jul 2011 11:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-810</guid>
		<description><![CDATA[Thank you! This script worked beautifully during a server migration from 2003 x86 to 2008 x64 with about 315 queues. I added another function that calls SetACL.exe (www.sf.net/projects/SetACL) to set perms on each queue since subinacl.exe was being a pain (couldn&#039;t set &quot;manage documents&quot; and &quot;print&quot; permissions at the same time).]]></description>
		<content:encoded><![CDATA[<p>Thank you! This script worked beautifully during a server migration from 2003 x86 to 2008 x64 with about 315 queues. I added another function that calls SetACL.exe (www.sf.net/projects/SetACL) to set perms on each queue since subinacl.exe was being a pain (couldn&#8217;t set &#8220;manage documents&#8221; and &#8220;print&#8221; permissions at the same time).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PGP</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-734</link>
		<dc:creator><![CDATA[PGP]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 10:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-734</guid>
		<description><![CDATA[Hi guys,

The script works fine under Windows 2k8 R2. Just one issue, the csv file must have the following headers:
Printserver,Driver,IPAddress,Portname,Sharename,Location,Comment,Printername

A previous post mentioned the header, nut the IPAddress was missing.]]></description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>The script works fine under Windows 2k8 R2. Just one issue, the csv file must have the following headers:<br />
Printserver,Driver,IPAddress,Portname,Sharename,Location,Comment,Printername</p>
<p>A previous post mentioned the header, nut the IPAddress was missing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micahel</title>
		<link>http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-718</link>
		<dc:creator><![CDATA[Micahel]]></dc:creator>
		<pubDate>Wed, 04 May 2011 04:38:05 +0000</pubDate>
		<guid isPermaLink="false">http://janegilring.wordpress.com/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/#comment-718</guid>
		<description><![CDATA[Seem to have some trouble with it and getting several errors..

Can anyone help me out? Thanks
Cannot convert value &quot;\\\ROOT:Win32_TCPIPPrinterPort&quot; to type &quot;System.Management.ManagementClass&quot;. Error: &quot;Invalid parameter&quot;
At C:\Users\hex\Desktop\Create-Printers.ps1.ps1:41 char:20
+ $port = ([WMICLASS] &lt;&lt;&lt;&lt; &quot;\\$server\ROOT\cimv2:Win32_Printer&quot;).createInstance()
  + CategoryInfo: Not Specified: (:) [], RuntimeException
  + FullyQualifiedErrorId : RuntimeException]]></description>
		<content:encoded><![CDATA[<p>Seem to have some trouble with it and getting several errors..</p>
<p>Can anyone help me out? Thanks<br />
Cannot convert value &#8220;\\\ROOT:Win32_TCPIPPrinterPort&#8221; to type &#8220;System.Management.ManagementClass&#8221;. Error: &#8220;Invalid parameter&#8221;<br />
At C:\Users\hex\Desktop\Create-Printers.ps1.ps1:41 char:20<br />
+ $port = ([WMICLASS] &lt;&lt;&lt;&lt; &quot;\\$server\ROOT\cimv2:Win32_Printer&quot;).createInstance()<br />
  + CategoryInfo: Not Specified: (:) [], RuntimeException<br />
  + FullyQualifiedErrorId : RuntimeException</p>
]]></content:encoded>
	</item>
</channel>
</rss>

