很抱歉向大家询问,但需要一些帮助才能得到这个。我在许多计算机上安装了一些打印机,例如 \server\printer。我想用 powershell 脚本删除它们,但无法完成。我在想这样的事情:
$printers=Get-Printer | where { $_.Type -eq 'Connection'} | select name /* this part show me only \\server\printers */
$printers | ForEach-Object {
if ($printers) {
Remove-Printer -Name $printers -Confirm:$false
}
}
提前感谢大家。