How to delete multiple network printers from several domain end user computers

JIcon 20 Reputation points
2023-02-21T23:29:24.43+00:00

Hello, we have many end users computers with each installed with multiple network printers installed from windows print servers. What is the fastest method to remove several network printers from the multitude of end user computers? Based on reading posts on the internet, GPO cannot really accomplish this. It seems running a batch file seems to be the best solution. Would anyone have a similar experience having to perform this task? Thanks!

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | Print jobs
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,751 Reputation points
    2023-02-23T09:26:18.55+00:00
    Hello there,
    
    This Powershell script might be helpful
    
    function ListAllPrinters {
        param (
            [string]$Comp
        )
    
        Invoke-Command -ComputerName $Comp -ScriptBlock {
            Get-ChildItem Registry::\HKEY_Users | 
                Where-Object { $_.PSChildName -NotMatch ".DEFAULT|S-1-5-18|S-1-5-19|S-1-5-20|_Classes" } | 
                    Select-Object -ExpandProperty PSChildName | 
                        ForEach-Object { 
                            Get-ChildItem Registry::\HKEY_Users\$_\Printers\Connections -Recurse | Select-Object -ExpandProperty Name 
                        }
        }
    }
    
    Similar discussion here https://social.technet.microsoft.com/Forums/windows/en-US/2e484b20-285f-474c-bbd6-5bf198aadf52/how-to-delete-printer-in-a-domain-user-profile?forum=winserverpowershell
    
    Hope this resolves your Query !!
    
    --If the reply is helpful, please Upvote and Accept it as an answer–
    
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.