RSS

Powershell – Rename-redirectedprinter

18 Feb

This script renames a redirected printer and sets it as default.

The reason this needs to be done, is because some older programs require a specific (short) printer name and will not work otherwise. With SAPlpd by example the printer name may only consist of x characters, no spaces, etc.

By default however with Remote Desktop Services in Server 2008 R2, a redirected printer will show as “<printername> (redirected <session ID>)” by example “Lexmark X1100 series (Redirected 2)”.

Note:
-Renaming a redirected printer is not supported.
-The script assumes there’s only one redirected printer that matches the comment filter.

All the hard work of determining what had to be done was performed by my colleague Peter Scheilen. I just converted it to PowerShell.

Advertisement
 
4 Comments

Posted by on February 18, 2013 in ICT, Microsoft

 

Tags: , , , , , , , , , , , ,

4 responses to “Powershell – Rename-redirectedprinter

  1. Martin Larochelle

    November 20, 2013 at 21:16

    Hi,
    I get this error when running the script any clue?

    + $printer.renameprinter <<<< ($newprintername)
    + CategoryInfo : InvalidOperation: (renameprinter:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Regards

    Like

     
  2. Art of Photography

    June 3, 2019 at 16:29

    Anyone have a copy of this script? Unable to log into sharepoint.

    Like

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: