MatthewL Posted July 18, 2016 Posted July 18, 2016 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
jamesfed Posted July 19, 2016 Posted July 19, 2016 Which server version are you running as PowerShell Cmdlet availability varies...?
MatthewL Posted July 19, 2016 Author Posted July 19, 2016 Server 2008 (none R2) as far as I am aware, would need to check.
dapaulio Posted July 22, 2016 Posted July 22, 2016 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.
HPlum78 Posted July 25, 2016 Posted July 25, 2016 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.
MatthewL Posted July 25, 2016 Author Posted July 25, 2016 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.
Geoff Posted July 25, 2016 Posted July 25, 2016 https://technet.microsoft.com/en-us/library/hh918353(v=wps.630).aspx
MatthewL Posted July 26, 2016 Author Posted July 26, 2016 From the sever I am going to be doing it on today.
Norphy Posted July 26, 2016 Posted July 26, 2016 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)
Geoff Posted July 26, 2016 Posted July 26, 2016 2008 R2 is out of mainstream support now. you shouldn't really be making a new server using it.
MatthewL Posted August 1, 2016 Author Posted August 1, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now