Jump to content

Recommended Posts

Posted

I am in need of a powershell script (as it seems to be the way to do it) to query a csv file with entries in to add 33 print queues to the print server (will add drivers prior) as per names specified, IP ports specified and then share based on the name given.

 

Can this be done and can someone point me in the right direction.

 

If it can be some in some other method i.e. vbs that would be great.

 

I've not used PS before so its new to be but everyone I speak to these days mentions its the way forward!

 

Thanks

Posted
If you are just adding printers to a print server I think ps is a bit overkill for 33 printers. Just manually add them. Should only take an hour if you have all the drivers to hand. For the time it has taken you to ask the question and wait a response you could have done it.
Posted
The version of PowerShell is not dictated by the version of the OS so I suppose the question is what does the $PSVersionTable output look like? like jamesfed says PS functionality changes depending on the PS version but also the WMF version as well (WSManStackVersion). I also have to disagree with the add them manual approach to this, I would encourage the use of PowerShell to do this and would allow my administrators an hour or two to write the script than point and click in the GUI, once the script is done its repeatable and can be run time and again also the skills you learn by applying yourself to a bit of PS learning is far more valuable than just having someone who can click a button! (I agree with Jeff Snover on this, look him up!) oh and if you are smart with this you can also automate the install of the drivers with some devcon magic. Get me the above from the $PSVersionTable and I will try and point you in the right direction.
Posted

I will confirm tomorrow. There are only 3 drivers which I can specify in the csv and load them up manually.

 

I want to get into powershell especially around adding printers as its a task we repeat time and time again any help would be greatful.

Posted
The version of PowerShell is not dictated by the version of the OS so I suppose the question is what does the $PSVersionTable output look like? like jamesfed says PS functionality changes depending on the PS version but also the WMF version as well (WSManStackVersion). I also have to disagree with the add them manual approach to this, I would encourage the use of PowerShell to do this and would allow my administrators an hour or two to write the script than point and click in the GUI, once the script is done its repeatable and can be run time and again also the skills you learn by applying yourself to a bit of PS learning is far more valuable than just having someone who can click a button! (I agree with Jeff Snover on this, look him up!) oh and if you are smart with this you can also automate the install of the drivers with some devcon magic. Get me the above from the $PSVersionTable and I will try and point you in the right direction.

 

The version of PowerShell is not dictated by the OS but the availability of PowerShell cmdlets is. There are plenty of PowerShell commands which exist in Windows 2012 R2 which aren't in 2008 R2, even if both OSes are running the same version of PowerShell. The Add-Printer command that @Geoff suggested requires Windows 2012 (R2) or Windows 8(.1)

Posted

I don't dictate what version of server the customer has when I get there I have to work with what I have and its an existing server.

 

Any help would be appreciated, just trying to save some time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...