Scripts Thread, Powershell Scripting Question in Coding and Web Development; I have been using Powershell for around 6 months now i'm i'm really loving it.
The 'power' it has (excuse ...
10th August 2011, 02:55 PM #1
Powershell Scripting Question
I have been using Powershell for around 6 months now i'm i'm really loving it.
The 'power' it has (excuse the pun) is great.
However, i've recently been looking at updating our scripts to install older printers that wont push via GP.
We used to copy a .txt file to a folder on C: and use IF EXIST DO etc... to see if the printer was there.
Now with powershell and WMI i am checking to see if the printer is there which is great.
But upon looking to actually install the networked printer and drivers, powershell seem to require quite a bit of code to do this.
now i can just run something like
cmd /c 'rundll32 printui.dll,PrintUIEntry /if /b "Maths Laser" /f "\\print\Drivers\Brother - HL-5240 5250N\BROHL05A.inf" /r "\\Office\Laser" /m "Brother HL-5240 series"'
which will do it in 1 line...
However, i feel like a traitor.
Is it better to use powershell exclusively, or save time and lines of code and send a command to the cmd.exe?
IDG Tech News
By StewartKnight in forum Web Development
Last Post: 4th June 2006, 12:23 PM
Last Post: 23rd June 2005, 11:27 PM
By ninjabeaver in forum Downloads
Last Post: 16th June 2005, 01:11 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)