Turn on the default printer sharing function with one click. How to use powershell to write a script that turns on the local default printer sharing in Windows with one click.

environment:

Win10 Professional Edition

Win11 Professional Edition

powershell

Problem Description:

Turn on the default printer sharing function with one click. How to use powershell to write a script that turns on the local default printer sharing in Windows with one click.

Insert image description here

solution:

修改Windows注册表来实现打印机共享:(未成功)

打开注册表编辑器:按下Win + R组合键,输入"regedit",然后按下回车键,以打开注册表编辑器。

导航至打印机相关的注册表路径:在注册表编辑器中,导航至以下路径:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers

选择要共享的打印机:在“Printers”文件夹下,找到你想要共享的打印机。可以通过查看打印机的名称来确定。

修改打印机的共享设置:右键点击选定的打印机,选择“新建”-

Guess you like

Origin blog.csdn.net/weixin_42672685/article/details/133382723