1

I'm using SCCM Version 1802, console version 5.1, site version 5.0.8. I want to be able to disable Litera EPO PDF Printer, Microsoft print to pdf, Microsoft XPS Document Writer, and Fax. The reason I want to do this is that I want to prevent these from being used, but I don't want to remove them from the user or the SCCM Image, just in case something breaks and it needs to be restored. I am currently using a powershell command to remove it but I have not been able to find a script to add these printers back. Is there such an option available? If so, how is it used? The command I am using is below.

Remove-Printer -Name "Microsoft Print to PDF"
webby68
  • 227
  • 1
  • 3
  • 17
  • The method to "add it back" will depend on the method used to remove the printers. So, your question is lacking necessary information. Please use the EDIT button and add information explaining how you are considering removing the printers, the scripts you've seen. – music2myear Mar 28 '19 at 20:50
  • @music2myear edited to include the information. – webby68 Mar 28 '19 at 20:56
  • @music2myear I have found that the Disable-WindowsOptionalFeature -FeatureName "...." -Online works to disable it. However, I get the message "One or several parent features are disable so current feature can not be enabled." How do I get around this? – webby68 Mar 29 '19 at 14:44

1 Answers1

1

Finding the right tool for the job is important. Because Print To PDF is an optional feature, there are a set of tools specifically designed to handle it.

The other PDF printers you are dealing with are not Windows Optional Features, and they ARE likely to consist of software and services and not just printers. You'll want to use their appropriate uninstallers in order to remove them correctly.

Powershell has the following cmdlets:

PS D:\> get-command -noun "WindowsOptionalFeature"

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Disable-WindowsOptionalFeature                     3.0        Dism
Cmdlet          Enable-WindowsOptionalFeature                      3.0        Dism
Cmdlet          Get-WindowsOptionalFeature                         3.0        Dism

Using these you can query the list of optional features:

PS D:\> Get-WindowsOptionalFeature -online | where state -eq "Enabled" | select FeatureName

FeatureName
-----------
Printing-PrintToPDFServices-Features

And you can disable them:

PS D:\>disable-windowsoptionalfeature -online -featurename Printing-PrintToPDFServices-Features


Path          :
Online        : True
RestartNeeded : False

And enable them:

PS D:\> enable-windowsoptionalfeature -online -featurename Printing-PrintToPDFServices-Features


Path          :
Online        : True
RestartNeeded : False

H/T to this SO question: https://stackoverflow.com/questions/35479080/how-to-turn-windows-feature-on-off-from-command-line-in-windows-10

music2myear
  • 40,472
  • 44
  • 86
  • 127