Add Unsigned Driver to System

Hi Everyone

I’ve created a script where I download a few printer drivers. I then add the drivers using the following command:

[pre]pnputil.exe -a C:\driver\OEMSETUP.INF[/pre]

Most of them work perfectly, except the ones which is not signed. I then tried to add them with the following command:

[pre]Add-WindowsDriver -Path “c:\driver” -Driver C:\driver\OEMSETUP.INF -ForceUnsigned[/pre]

I then get this error:

Add-WindowsDriver : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.

I’ve used DISM.exe before to do some basic fixes, but haven’t grasped the full concept yet. How can I add the driver without creating a certificate?

Any help would be appreciated.

Windows 8 and higher really does not like doing this. PowerShell notwithstanding.
There’s steps required and a forced reboot to turn of signature checking and the like.

Example:
https://www.youtube.com/watch?v=StkR3D2d5WI

So, not a very automated thing.