Skip to content

Remove-DriverFromRemote

SYNOPSIS

Remove a printer driver from a remote computer.

SYNTAX

Remove-DriverFromRemote [-computerName] <String> [-driverName] <String> [<CommonParameters>]

DESCRIPTION

This function removes a specified printer driver from a remote computer. It stops the print spooler service, renames the associated print processor registry key, removes the printer driver, and restores the original registry key. The function ensures the remote computer is reachable and has WinRM enabled before proceeding.

EXAMPLES

EXAMPLE 1

Remove-DriverFromRemote -ComputerName "SRVPRINT01" -DriverName "Canon iR-ADV C5250/5255 UFR II"

Removes the specified Canon printer driver from the remote computer "SRVPRINT01".

EXAMPLE 2

Remove-DriverFromRemote -ComputerName "SRVPRINT02" -DriverName "HP Universal Printing PCL 6"

Removes the specified HP printer driver from the remote computer "SRVPRINT02".

PARAMETERS

-computerName

The name of the remote computer from which the printer driver will be removed.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-driverName

The name of the printer driver to be removed.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES