How to remove printers from windows 11 which were installed via printers.csv intune app

Duarte Santos 0 Reputation points
2023-06-02T13:45:59+00:00

Hello

Here's a doubt.

Previously we installed printers via intune using printers.csv and distributing print provisioning, Basically we follow a tutorial: https://www.youtube.com/watch?v=8glLCjBytIA

Now we want to install the printers using policies (configuration profiles). We are trying to uninstall the printers via intune the uninstall option in the app that distribute them, but the printers remain in windows clients.

To remove them, i remove them manually in my computer.

i have the configuration profile done and in production along with the first solution, but i need to "clean" clients computers and then install the correct printer.

Can you help me?

Thanks in advance.

Duarte Santos

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,639 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,996 Reputation points
    2023-06-05T09:59:42.74+00:00
    Hi there 
    please check this 
    <#
    .Synopsis
    Created on:   31/12/2021
    Created by:   Ben Whitmore
    Filename:     Remove-Printer.ps1
    powershell.exe -executionpolicy bypass -file .\Remove-Printer.ps1 -PrinterName "Canon Printer Upstairs"
    .Example
    .\Remove-Printer.ps1 -PrinterName "Canon Printer Upstairs"
    #>
    
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory = $True)]
        [String]$PrinterName
    )
    
    Try {
        #Remove Printer
        $PrinterExist = Get-Printer -Name $PrinterName -ErrorAction SilentlyContinue
        if ($PrinterExist) {
            Remove-Printer -Name $PrinterName -Confirm:$false
        }
    }
    Catch {
        Write-Warning "Error removing Printer"
        Write-Warning "$($_.Exception.Message)"
    }
    
    And see if it helps,
    Thank you 
    --If the reply is helpful, please Upvote and Accept as answer--
    
    0 comments No comments