{"id":38,"date":"2013-11-06T05:48:20","date_gmt":"2013-11-06T03:48:20","guid":{"rendered":"http:\/\/blog.appcloud.ch\/?p=38"},"modified":"2013-11-06T05:48:20","modified_gmt":"2013-11-06T03:48:20","slug":"check-application-properties-with-powershell-script","status":"publish","type":"post","link":"https:\/\/blog.sachathomet.ch\/de\/2013\/11\/06\/check-application-properties-with-powershell-script\/","title":{"rendered":"Check Citrix XenApp published application properties with a PowerShell script"},"content":{"rendered":"<p>To avoid troubles with session sharing, you have to keep in mind that you set the application properties which are relevant for the session and his virtual channels in the same way.<br \/>\nThis is for example the properties like\u00a0color depth or the audio setting.<\/p>\n<p>To check this, I&#8217;ve written a small PS script which loops trough all application, reads the application properties and shout if something is not like expected.<\/p>\n<p><strong>Show all apps which are not published as 32bit Color:<\/strong><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n#========================================================================\n# Created on: 5.11.2013 \n# Created by: Sacha T. http:\/\/blog.sachathomet.ch \n# Filename: apps_not32bit_Office.ps1\n#========================================================================\nwrite-host &amp;quot;This Script show all Apps in Workergroup National which are not in 32 bit color depth published&amp;quot;\nAdd-PSSnapin Citrix.XenApp.Commands\n\n #$applications = Get-XAApplication #Gets the published applications\n $applications = Get-XAApplication -WorkerGroupName National\n\n\nforeach($app in $applications){\n \n #Check to see if the application audio is disabled\n if($app.ColorDepth -ne &amp;quot;Colors32Bit&amp;quot;){\n $app_no32b+= &amp;quot;$app is not published in 32 bit.`n&amp;quot;\n }\n \n }\n \n echo &amp;quot;`nApps not 32bit: &amp;quot;\n echo $app_no32b\n \n \nWrite-Host &amp;quot;Press any key to continue \u2026&amp;quot; \n$x = $host.UI.RawUI.ReadKey(&amp;quot;NoEcho,IncludeKeyDown&amp;quot;)\n<\/pre>\n<pre><\/pre>\n<p>&nbsp;<\/p>\n<pre><\/pre>\n<p>Change the green Workergroup to your workergroupname, it&#8217;s also possible to run this script without the parameter -WorkerGroup, but then all published content will be recognized as &#8222;non-32-bit&#8220;.<\/p>\n<pre><strong style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;\">If you want see which application has audio disabled just change the attribut in the loop:\u00a0<\/strong><\/pre>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n\n---&amp;lt;snip&amp;gt;--- foreach($app in $applications)\n{ #Check to see if the application audio is disabled if($app.AudioType -eq &amp;quot;none&amp;quot;)\n{ $app_noaudio+= &amp;quot;$app audio is currently disabled.`n&amp;quot; } } echo &amp;quot;`nApps Audio disabled: &amp;quot; echo $app_noaudio\n---&amp;lt;snip&amp;gt;---\n\n<\/pre>\n<p>&nbsp;<\/p>\n<p>This easy loop you can recycle to check every application attribute, all possible attributes of an app you can get with an<\/p>\n<pre>Get-XAApplication -BrowserName \"thebrowsernameofourapp\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To avoid troubles with session sharing, you have to keep in mind that you set the application properties which are relevant for the session and his virtual channels in the same way. This is for example the properties like\u00a0color depth or the audio setting. To check this, I&#8217;ve written a small PS script which loops [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,1],"tags":[14,32,44],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-scripts","category-uncategorized","tag-citrix","tag-powershell","tag-xenapp"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"de","enabled_languages":["en","de"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"de":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}