Avatar of jskfan
jskfanFlag for Cyprus

asked on 

Check if the option "print directly to printer" is enabled

Check if  the option "print directly to printer"  is enabled

I would like to have a script that reads computer names from a file and check if the default printer has the option "Print directly to printer" enabled.
the script below will  enable the option "print directly to printer" . if t can be modified to send query to see if the option has been enabled that would be great.

Thank you


FOR /f "delims=" %%G in (c:\Scripts\CompOnly.csv) DO wmic.exe /node:%%G /username:"Domain\User" /password:"TopSecret" printer where "Name='Myprinter'" set Direct=1

Timeout 5

Open in new window

Windows Batch

Avatar of undefined
Last Comment
jskfan
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Noah
Noah
Flag of Singapore image

Hi there! :)

Try something like this. Replace EPSON in between the two * with your printer name.

Get-Printer -Name *EPSON* | Get-PrintConfiguration

Open in new window

Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

oBDA,

that script works fine it is retrieving all the printers on each computer . if you can query just the default printer on each computer.
Thank you
Avatar of oBdA
oBdA

Can't be done, sorry. The default printer is a user specific setting, so the "computer" doesn't have a default printer.
You can only query by printer name like above.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

it worked ...Thank you very much
Windows Batch
Windows Batch

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.

13K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo