{"id":116,"date":"2014-06-02T22:16:03","date_gmt":"2014-06-02T20:16:03","guid":{"rendered":"http:\/\/blog.appcloud.ch\/?p=116"},"modified":"2014-06-02T22:16:03","modified_gmt":"2014-06-02T20:16:03","slug":"create-applications-to-each-server","status":"publish","type":"post","link":"https:\/\/blog.sachathomet.ch\/de\/2014\/06\/02\/create-applications-to-each-server\/","title":{"rendered":"Create published applications XenApp to each server"},"content":{"rendered":"<p>For testing purposes it can be helpful to have a published application without loadbalancing to every single server of your Citrix Farm. The creation of such application can be easily done with the following example script which create a CMD on every farm server:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n\nAdd-PSSnapin Citrix.XenApp.Commands -ErrorAction SilentlyContinue\n$serverlist = Get-XAServer #Get all server from farm\n\n#Mainprogram\n# loop through all servers\n\n foreach($srv in $serverlist)\n {\n\n echo $srv.ServerName\n\n New-XAApplication -BrowserName &quot;cmd on $srv&quot; -ApplicationType &quot;ServerInstalled&quot; -DisplayName &quot;cmd on $srv&quot; -FolderPath &quot;Applications\/Published Apps\/z_admin&quot; -ClientFolder &quot;Administration\\cmd&quot; -Enabled $true -CommandLineExecutable &quot;C:\\Windows\\system32\\cmd.exe&quot; -WorkingDirectory &quot;C:\\Windows\\system32&quot; -AnonymousConnectionsAllowed $false -AddToClientStartMenu $false -InstanceLimit &quot;-1&quot; #-WindowType &quot;1024\u00d7768&quot; -ColorDepth &quot;Colors256&quot;\n\n Add-XAApplicationAccount -BrowserName &quot;cmd on $srv&quot; -Accounts &quot;domain\\USER1&quot;\n Add-XAApplicationAccount -BrowserName &quot;cmd on $srv&quot; -Accounts &quot;domain\\USER2&quot;\n Add-XAApplicationServer -BrowserName &quot;cmd on $srv&quot; -ServerNames $srv.ServerName\n\n }\n\n<\/pre>\n<pre><\/pre>\n<p>By the way &#8230; if you made a mistake you can remove the created applications by the same foreach-loop with Remove-XAApplication:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n$serverlist = Get-XAServer #Get all server from farm\n#Mainprogram\n# loop through all servers\nforeach($srv in $serverlist)\n {\n \n echo $srv.ServerName\n Remove-XAApplication -BrowserName &quot;cmd on $srv&quot;\n}\n<\/pre>\n<p>&nbsp;<\/p>\n<p>All scripts are provided AS IS without warranty of any kind.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For testing purposes it can be helpful to have a published application without loadbalancing to every single server of your Citrix Farm. The creation of such application can be easily done with the following example script which create a CMD on every farm server: Add-PSSnapin Citrix.XenApp.Commands -ErrorAction SilentlyContinue $serverlist = Get-XAServer #Get all server from [&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":[32,44],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-scripts","category-uncategorized","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\/116","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=116"}],"version-history":[{"count":0,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}