Author Posts

January 1, 2012 at 12:00 am

by cheex at 2013-01-08 09:14:50

I did a search and nothing came up. I would like to remotely install a printer on a RD host running windows 2008 R2. I believe i have the correct command and it give no errors however it doesn't install the printer. The driver is installed on the host machine already. Also the command inside the { } works in CMD on the host machine, so i cant figure out why it's not working with Invoke-Command. I have enabled


Invoke-Command -CN SERVER {rundll32 printui.dll,PrintUIEntry /if /b "BELLINV1-T" /r "IP-ADDRESS" /m "EPSON FX-2190 ESC/P"}

I have also tried adding -ScriptBlock and -Credential [Domain]\Administrator I have even tried:


Enter-PSSession -ComputerName SERVER -Credential [Domain]\administrator
Invoke-Command {rundll32 printui.dll,PrintUIEntry /if /b "BELLINV1-T" /r "IP-ADDRESS" /m "EPSON FX-2190 ESC/P"}

Also, tried a few alterations of the above using

Invoke-Expression

Any help would be great.

by DonJ at 2013-01-08 09:23:59

Does the command inside the { } work as-is when run from Windows PowerShell directly on the host machine? Not Cmd.exe, but PowerShell.

by cheex at 2013-01-08 09:50:06

yes, thats the odd part.

by DonJ at 2013-01-08 10:03:10

Then it's likely a delegation issue. For some reason the command is trying to access a resource that requires authentication, but isn't able to use the delegated credential sent over by Remoting.

by cheex at 2013-01-08 11:26:36

yeah thats kind of what i was thinking. I will look into it.