Printers
August 31, 2023 ยท View on GitHub
How to work and deal with printers in real world using powershell.we all encountered annoying printers and also to cancel them takes time.read this and solve problems in just a click from now on.
- List All Printers
- Cancel Printers Jobs
- List All Printers Jobs
- Share Local Printer
List All Printers
to List All Printers in powershell just run this command.
\.list-printers.ps1
to get information in CMD just run this command
wmic printer get DriverName, Name, Portname
and also this command
wmic printer list brief
Cancel Printers Jobs
to Cancel Printers Jobs in powershell just run this command.
.\printer-cancel-jobs.ps1
List All Printers Jobs
to List All Printers Jobs in powershell just run this command.
.\list-printer-jobs.ps1
Share Local Printer
share a printer that connected to a computer without a LAN.for example in an office with limitated lan ports this techniques is very usefull.we should do configuration on both pc.first one that let others to use its printer and others that connect to first pc.
on the computer has printer connected to we should do this steps:
- Open Settings
- Click on Printers & scanners
- Under the "Printer & scanners" section, select the printer to share in the network
- Click the Manage button
- Click the Printer properties option
- Click the Sharing tab
- Check the "Share this printer" option
- In the "Share name" field, specify a new short and descriptive name
- Click the Apply button
- Click the OK button
on the computer wants to connect to printer we should do this steps::
- Open Settings
- Click on Devices
- Click on Printer & scanners
- Click the "Add a printer or scanner" button.
- Select the printer from the list.
- Click the Sharing tab
- Choose the "Select a shared printer by name" option
- In the "Share name" field, specify a new short and descriptive name
- Type the path of the printer location: \\xxx.xxx.xxx.xxx\PRINTER-SHARE-NAME
- Click the OK button
Keep in mind that you can also use hostname as a way of connecting printers.
if you want to know how to find a hostname of a pc just type hostname in CMD.