Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8901791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:26:57+00:00 2026-06-15T01:26:57+00:00

I have a printer server which hosts around 1000 printers. I want to delete

  • 0

I have a printer server which hosts around 1000 printers. I want to delete one of these.

I am currently using this command:

$p = Get-WmiObject -Class Win32_printer -ComputerName $server -namespace "root\CIMV2" -filter "name='printer0456'"

It works, it finds the printer, and then I can use this command to delete it:

$p.delete()

But what freaks the hell out of me, is that it takes like 2-3 minutes for the first command to find the printer. To me, it makes to sense at all.

Is there something I am doing wrong, or something else I can use to delete a printer faster ?

EDIT: check my response

That way, it only fetch until it founds the correct printer, instead of parsing the whole printer list.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:26:59+00:00Added an answer on June 15, 2026 at 1:26 am

    TEMPORARY SOLUTION I HAVE FOUND

    $p = $null
    Get-WmiObject -Class Win32_printer -ComputerName $server|ForEach-Object{
        if($_.name -eq "printer0456"){
            $p = $_
            break
        }
    }
    if($p -ne $null){
        $p.delete()
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the printer installed and working on an intranet server and I want
I have a networked printer which all request go through a print server at
We are using Hudson with git. We have a build/test server which compiles our
I have a script on one server which is posting a json array to
I have a printer that doesn't have the driver for my windows server 2008,
I am using a dot matrix printer and have to do a continious printing
I have a webpage that activates a print job on a printer. This works
We have in-house server which brings the records by php from mysql. We have
I have a table in SQL server which has a DATETIME field called Date_Printed.
I have a Django app on a Linux server. In one of the views,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.