惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
V
V2EX
IT之家
IT之家
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
D
Docker
S
Secure Thoughts
Recent Announcements
Recent Announcements
Webroot Blog
Webroot Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
博客园_首页
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Security Archives - TechRepublic
Security Archives - TechRepublic
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
I
InfoQ
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
T
Troy Hunt's Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Attack and Defense Labs
Attack and Defense Labs
美团技术团队
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Scott Helme
Scott Helme
T
Tor Project blog
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
G
Google Developers Blog

博客园 - pyman

win系统安装冲突(固态、机械硬盘双系统不并存) 希沃一体机---信号源乱切换( 或者 警告:模块不匹配) 让“照片查看器"显示,并且能打开多种格式 联想云平台与机房使用 博文阅读密码验证 - 博客园 iPad恢复遇到问题 非常有意思的cmd命令行倒计时 网页突破复制粘贴Absolute Enable Right Click & Copy插件 影子系统保护Windows 网络最常用的几个命令(arp ,net view,tracert,netstat) 使用VLOOKUP函数应用&修改Excel默认的等线字体 win2019不能查看图片的解决方法(已验证) win10自动升级后不能访问内网 客户端桌面显示信息-----工具Bginfo H510以上芯片主板安装Windows系统 命令行实现自动清除浏览器的浏览记录(vbs) fckeditor的显示(chrome浏览器不正常显示fckeditor编辑器) 在office文档中,如何批处理调整图片的亮度对比度?录制宏,编辑宏,运行 win2019文件共享访问设置后不能保存
win10中用cmd命令行添加网络共享打印机并设为默认打印机
pyman · 2026-01-12 · via 博客园 - pyman

通常,对于网络打印机,使用PowerShell命令或直接使用printui.dll的简单命令行方法会更直接和方便。对于本地连接的打印机,使用net userundll32的组合方法也是可行的。

方法2:使用Add-Printer PowerShell 命令(推荐用于网络打印机)推荐

Add-Printer -ConnectionName "\\打印服务器\打印机共享名"

例如,连接局域网共享的打印机(保存为bat可以直接运行)

@echo off
powershell -Command "Add-Printer -ConnectionName '\\100.6.251.9\HP LaserJet Pro M201-M202 PCL 6 (副本 1)'"

设置默认打印机(下面保存为bat,直接在win10下运行)

rundll32 printui.dll,PrintUIEntry /y /n "\\100.6.251.9\HP LaserJet Pro M201-M202 PCL 6 (副本 1)"

方法又很多种。但选简单实用最理想。

前提是保证打印机正确安装并且已经共享。可以连接。那么,在局域网内,其他计算机要连接网络共享打印机。就是双击bat文件的事情了。