Solved

Is it possible to automatically create 'dummy' printers in Windows 7/2008/2012?

Posted on 2015-01-22
14
194 Views
Last Modified: 2015-01-22
I need to do some load/capacity testing on Windows 7/2008 and 2012. It involves having to mimic a situation where there are maybe 100+ printers installed on the machine.  All I'm interested in is having the printers 'there' and sending output to a port where it will be picked up by some other software and effectively put in a big black hole.

Creating 100+ dummy printers manually would take ages so I wondered if anyone knew of a way to automate this process and (if possible) specify a sequence for the printer names i.e. P1, P2, P3....P100?

Many thanks
0
Comment
Question by:funasset
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 16

Expert Comment

by:DansDadUK
ID: 40564055
>> ... having the printers 'there' and sending output to a port where it will be picked up by some other software and effectively put in a big black hole. ...

Don't know how to automate (PowerShell script perhaps?), but as regards the output, you could maybe set up the printers to print to  the FILE: port, so you'd get (multiple) 'big files' instead of a 'big black hole'.
0
 

Author Comment

by:funasset
ID: 40564078
Thanks for the tip. Appreciate it.

It's the automatic creation that is giving me the headache. I'm sure that someone out there knows.......I'm not a Developer or scripting-type person so I will need a bit of a noddy guide! If it CAN be done that is!
0
 
LVL 37

Accepted Solution

by:
Neil Russell earned 500 total points
ID: 40564097
Follow this page and you will have it done in no time :P

http://blog.powershell.no/2009/11/07/bulk-create-printer-objects-on-print-servers-using-windows-powershell/

Allows you to create a CSV file with printers and drivers, IP etc all listed.
Have a read and try.  Its fairly self explanatory.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:funasset
ID: 40564164
Many thanks - that looks (even to a lowly tester like me!) like it is along the lines of what I need to do.

A couple of questions about the scripting process and csv requirements.......

1. I don't think it's possible in Excel to create a mixed series? So if I wanted Dummy-1, Dummy-2 then I don't think Excel will let me create a series like that to get to Dummy-100. Does that mean my printer names will have to be simply numeric i.e. 1,2,3,4....100?

2. Is it possible to tweak/add something in the script to ignore/do away with Sharename, Location and Comment as I don't need those items?

3. How can I make sure that all instances are set to print using LPR in their port settings?

Many thanks
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40564250
1) My excel does.  Enter dummy-1 in A1 and then copy down....
2) Just use printername in all 3 columns of the CSV for Sharename, Location and Comment  as editing the script is not something I can do right now, or can you wait till later?
3)  I will think....
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40564260
For 3)  Change the line in the script that reads...
$port.Protocol=1

Open in new window


To read...

$port.Protocol=2

Open in new window

0
 

Author Comment

by:funasset
ID: 40564266
Cheers for that.  I had a tentative crack at creating just one new printer and it actually worked - albeit it's simply called '1' and the port isn't configured as I need it but I felt quite chuffed - it doesn't take much at my age.

1. I'll have a tinker with Excel. Thanks.
2. I changed the $print.Shared=$true to $false and left the columns in the CSV blank. A stab in the dark but it seemed to work.
3. I need them to be set to LPR and given the Queue name 'Test'.  I see that in the discussion some people add new lines to the script so I guess there is a list of things associate with '$print' somewhere.
0
 

Author Comment

by:funasset
ID: 40564268
Sorry - our updates crossed in the ether. I'll change that variable and see what happens......
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40564277
if you run the following in a powershell window...

clear

$server = “.”
$print = ([WMICLASS]”\\$($server)\ROOT\cimv2:Win32_Printer”).createInstance()
$print | Get-Member

Open in new window


You will get listed ALL of the properties and methods of that print object.
0
 

Author Comment

by:funasset
ID: 40564373
I think I may actually be there bar the incrementing of the printer names. Magic!

Are we talking about the same thing as far as the Excel series? I was hoping to create the first entry and have the names incremented by using the Fill--Series feature so that I'd get a column of 100 names beginning

Dummy-1
Dummy-2
Dummy-3 .......etc

If I create Dummy-1 and just copy down I simply get lines all with Dummy-1 as the name. It's no biggie to have the printers simply listed in Windows as 1, 2, 3.... I could live with that if needs be.

Your help is much appreciated.
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40564501
What version of excel? As i say I just put dummy-1 in A! and then grabbed the corner and dragged down and it filled with increment in 2010
0
 

Author Comment

by:funasset
ID: 40564555
Excellent!! I was grabbing the cell in the wrong place. That's 2 new things I've learned today - and will no doubt forget by tomorrow :)

Thanks for all your help.

Cheers
0
 

Author Closing Comment

by:funasset
ID: 40564556
Just what I needed to do. Sorted.
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40564856
Your welcome. Glad to have helped
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
robocopy vs xcopy vs copy 8 152
Transferring files to iPhone 3 84
ServiceCenter IR Query Expressions 1 51
How to set up a video conference between two classrooms 8 54
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question