简体   繁体   English

在Domain中查找使用Powershell在其上安装打印机的打印服务器

[英]Find print server on which a printer is installed using powershell in Domain

I need to quickly find out the server on which a printer is installed in my Domain. 我需要快速找出在我的域中安装打印机的服务器。 There are 12 print servers with more than 50 printers on each. 有12台打印服务器,每台服务器上有50多台打印机。 I used fol command but I get error 我使用了fol命令,但出现错误

PS C:\>Get-Printer -Name "PayRoll_Sec_ptr"

But this command give me result only when used on the particular server on which the printer is installed. 但是,此命令仅在安装打印机的特定服务器上使用时才给我结果。 That means I have to write it on 12 servers (or till I get the server where the printer is installed" 这意味着我必须将其写入12台服务器上(或者直到获得安装打印机的服务器为止”

When I used this command on my AD Role computer. 当我在AD角色计算机上使用此命令时。 it says 它说

the term "get-printer" is not recognized as the name of a cmdlet, function, 

 script file, or operable program.

the Get-Printer cmdlet is one of the many that are not on earlier OSs. Get-Printer cmdlet是较早版本的操作系统所没有的众多功能之一。 for instance, it is not available on win7ps5.1 at all. 例如,它根本不在win7ps5.1上可用。

you may want to use the CIM cmdlets to make the calls from your workstation. 您可能要使用CIM cmdlet从工作站进行呼叫。 this ... 这个 ...

Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'

will get the printers from the systems listed. 将从列出的系统中获取打印机。 you can feed it a list in the -ComputerName parameter to get info from all your print servers. 您可以在-ComputerName参数中为它提供一个列表,以从所有打印服务器获取信息。

while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system. 尽管似乎不太可能,但是如果需要在ps2.0系统上运行该命令,则可以使用该命令的WMI版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Powershell检查是否在远程服务器上安装了特定程序 - Check if specific programs are installed on a remote server using powershell 从Windows打印服务器轮询打印机信息 - Polling printer info from a Windows print server 使用Ghostscript和.NET将PDF打印为灰度打印机 - Print a PDF to Printer in Grayscale Using Ghostscript and .NET 使用php直接打印到网络打印机 - Print directly to network printer using php 我必须使用打印命令进行打印,其中我的打印机是具有IP的网络打印机? - I have to print using print command where my printer is network printer with IP? 在新的打印服务器上保留旧的默认打印机名称 - Keep old default printer name on new print server 加入域后如何查找由CA服务器自动注册的Windows证书 - How to find windows certificate which is autoenrolled by CA server after domain joining 使用Powershell脚本从默认域策略中提取批量Windows服务器的安全设置 - Extract Security Settings from Default Domain Policy for bulk windows server using Powershell script Windows Server AD 2022 - 使用 PowerShell 通过 GPO 将域用户添加到本地组“远程桌面用户” - Windows Server AD 2022 - Add a domain user to the local group "Remote Desktop Users" via GPO using PowerShell 如何通过 usb 使用 flutter 桌面打印并连接到打印机? - How to print and connect to printer using flutter desktop via usb?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM