{"id":1485,"date":"2014-10-02T08:28:14","date_gmt":"2014-10-02T07:28:14","guid":{"rendered":"http:\/\/blog.cloud-client.info\/?p=1485"},"modified":"2014-10-02T08:28:14","modified_gmt":"2014-10-02T07:28:14","slug":"tip-getting-legacy-printer-names-back-in-xenapp-7-5","status":"publish","type":"post","link":"https:\/\/blog.cloud-client.info\/?p=1485","title":{"rendered":"Tip: Getting legacy printer names back in XenApp 7.5"},"content":{"rendered":"<div class=\"f1b57b4156f3c43e8a7d72dffc4b2e52\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5449811010861855\";\r\n\/* blog.cloud-client.info 2 *\/\r\ngoogle_ad_slot = \"6689524735\";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 60;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Hello Folks,<\/p>\n<p>i got some questions regarding the use of legacy printer names in XenApp 7.5. In XenApp\/XenDesktop 7.5 the legacy printer name policy is not available any more. This is really bad for a couple of applications which needs to get the old Printer name convention.<\/p>\n<p>After doing a small research i found a working solution in the Citrix Forums, after the Login was done and the Printers are mapped you need to run a small powershell script:<\/p>\n<p><code>$SessionID=((qwinsta \/server:$ServerName | foreach { (($_.trim() -replace \u201c\\s+\u201d,\u201d,\u201d))} | ConvertFrom-Csv)|Where-Object {$_.SESSIONNAME.StartsWith(\"&gt;\")}).id<br \/>\n$MyPrinters=Get-WmiObject -Class Win32_Printer -Filter \"PortName like 'Client:$SessionID%'\" -Property PortName,DeviceID<br \/>\n$MyPrinters|% {$_.RenamePrinter(\"Client\/$env:clientname#\/\"+$_.PortName.Split(':')[2])}&gt;$null<\/code><\/p>\n<p>Save this code in a powershell script and execute it as last command in a logon script.<\/p>\n<p>Of course you can modify it if required but please note: This comes without any support or warranty!<\/p>\n<p>Cheers<br \/>\nMichael<\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Hello Folks, i got some questions regarding the use of legacy printer names in XenApp 7.5. In XenApp\/XenDesktop 7.5 the legacy printer name policy is not available any more. This is really bad for a couple of applications which needs to get the old Printer name convention. After doing a small research i found a [&hellip;]<\/p>\n","protected":false},"author":1423,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[38,36,37],"tags":[],"class_list":["post-1485","post","type-post","status-publish","format-standard","hentry","category-vdi-in-a-box","category-xenapp","category-xendesktop"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3AZQ3-nX","_links":{"self":[{"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/posts\/1485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/users\/1423"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1485"}],"version-history":[{"count":1,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/posts\/1485\/revisions"}],"predecessor-version":[{"id":1486,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=\/wp\/v2\/posts\/1485\/revisions\/1486"}],"wp:attachment":[{"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cloud-client.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}