Yeah, but that is in PowerShell, I want you try it in command prompt using the following command:
Dism /online /Enable-Feature /FeatureName:Microsoft-Windows-Printing-PrintToPDFServices-Package
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I used the following command to find the feature name and the second one (Powershell) to disable Microsoft Print to PDF, and the third one to re-enable it.
DISM /online /get-features /format:table | find "Disabled"
Disable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Printing-PrintToPDFServices-Package"
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Printing-PrintToPDFServices-Package"
The disable command works perfectly, however, I get the following message when trying to enable it.
"enable-windowsoptionalfeature : One of several parent features are disabled so current feature can not be enabled." (See Screenshot)

Secondly, I try to enable the feature through "Turn Windows features On or Off" but it can't be found. (See screenshot)

I have researched this for several hours now and the only information I can find is how to add the printer back through Programs and Features. I would appreciate all help resolving this problem.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Yeah, but that is in PowerShell, I want you try it in command prompt using the following command:
Dism /online /Enable-Feature /FeatureName:Microsoft-Windows-Printing-PrintToPDFServices-Package
The repair upgrade is the only option I can see around this. I noticed you are on Windows 10 1709. Do you have any other virtual machines where you could test if this also happens in a newer version of Windows 10 such as Windows 10 1809?
Sadly we don't. We use PXE Boot from the same image. I can look into that next week though. Thank you for your assistance.