<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>admintube</title>
	<atom:link href="http://admintube.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://admintube.com</link>
	<description>… time to reveal</description>
	<lastBuildDate>Mon, 05 Mar 2012 07:49:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Is your print spooler stuck?</title>
		<link>http://admintube.com/278/is-your-print-spooler-stuck/</link>
		<comments>http://admintube.com/278/is-your-print-spooler-stuck/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 07:47:18 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Windows 2008]]></category>
		<category><![CDATA[Printing]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=278</guid>
		<description><![CDATA[For reference I would like to point out an recent article from the MS Performance Team. This one can be quite interesting if you troubleshoot print spooler problems in your environment. Fortunately these kind of problems are not happening that often nowadays, but often enough to keep it in mind: Microsoft Fixit for Printing @ [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>For reference I would like to point out an recent article from the <a title="Ask the Performance Team" href="http://blogs.technet.com/b/askperf/">MS Performance Team</a>.</p>
<p>This one can be quite interesting if you troubleshoot print spooler problems in your environment. Fortunately these kind of problems are not happening that often nowadays, but often enough to keep it in mind:</p>
<p><strong><a title="Microsoft Fixit for Printing @ Ask the Performance Team" href="http://blogs.technet.com/b/askperf/archive/2012/02/24/microsoft-fixit-for-printing.aspx">Microsoft Fixit for Printing @ Ask the Performance Team</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/278/is-your-print-spooler-stuck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deep dive videos &#8211; Nordic Infrastructure Conference 2012 event</title>
		<link>http://admintube.com/261/deep-dive-videos-nordic-infrastructure-conference-2012-event/</link>
		<comments>http://admintube.com/261/deep-dive-videos-nordic-infrastructure-conference-2012-event/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 11:16:19 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=261</guid>
		<description><![CDATA[Yesterday I stumbled over the following website while I was searching for Powershell WMI Eventing. You can find all sessions from their event in January as video to see them online and for free. I found them quite useful (haven&#8217;t seem them all yet). Here is a link listing all available sessions: NIC 2012 Program [...]]]></description>
				<content:encoded><![CDATA[<p></p><p title="Nordic Infrastructure Conference 2012">Yesterday I stumbled over the following <a href="http://www.nic2012.com">website </a>while I was searching for <strong>Powershell WMI Eventing</strong>.</p>
<p>You can find all sessions from their event in January as video to see them online and for free. I found them quite useful (haven&#8217;t seem them all yet).</p>
<p>Here is a link listing all available sessions:<br />
<a title="NIC 2012 Program" href="http://www.nic2012.com/nic2012_agenda/program">NIC 2012 Program</a></p>
<p>If you are interested in WMI Events have a look to these sessions:<br />
<a href="http://vimeo.com/nicconf/review/35053006/5d895aa209">Thomas Lee: An introduction to WMI And PowerShell</a><br />
<a href="http://vimeo.com/nicconf/review/35061905/3cb45966a2">Thomas Lee: WMI Eventing with PowerShell</a></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/261/deep-dive-videos-nordic-infrastructure-conference-2012-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Rid Of DigiNotar&#8217;s Root CA</title>
		<link>http://admintube.com/247/getting-rid-of-diginotars-root-ca/</link>
		<comments>http://admintube.com/247/getting-rid-of-diginotars-root-ca/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 06:35:46 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Windows 2008]]></category>
		<category><![CDATA[Windows 2008 R2]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=247</guid>
		<description><![CDATA[Today I just want to share an easy way (which I actually most liked) on how to delete DigiNotar&#8217;s Root certificates from your Windows &#8220;Trusted Root Certification Authorities&#8221; certificate store: certutil -delstore authroot “c0 60 ed 44 cb d8 81 bd 0e f8 6c 0b a2 87 dd cf 81 67 47 8c” certutil -delstore authroot “43 [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>Today I just want to share an easy way (which I actually most liked) on <strong>how to delete DigiNotar&#8217;s Root certificates</strong> from your Windows &#8220;Trusted Root Certification Authorities&#8221; certificate store:</p>
<pre>certutil -delstore authroot “c0 60 ed 44 cb d8 81 bd 0e f8 6c 0b a2 87 dd cf 81 67 47 8c”
certutil -delstore authroot “43 d9 bc b5 68 e0 39 d0 73 a7 4a 71 d8 51 1f 74 76 08 9c c3”</pre>
<p>Sidenote: <strong>certutil.exe</strong> is included starting from Vista and Windows 2008 (for older OS&#8217;s you need to download it from Microsoft.)</p>
<ul>
<li><strong>A good source including the tip above can be found here</strong>: <a href="http://blogs.technet.com/b/srd/archive/2011/09/04/protecting-yourself-from-attacks-that-leverage-fraudulent-diginotar-digital-certificates.aspx" target="_blank">Protecting yourself from attacks that leverage fraudulent DigiNotar digital certificates</a>.</li>
<li>Original Microsoft Security Advisory (2607712): <a href="http://www.microsoft.com/technet/security/advisory/2607712.mspx" target="_blank">Fraudulent Digital Certificates Could Allow Spoofing</a>.</li>
<li>If you like to know some powershell code the get similar things done have a look here (example of powershell code to manage the cert store): <a href="http://myitforum.com/cs2/blogs/brandonlinton/archive/2011/08/30/microsoft-security-advisory-diginotar-2607712-removal.aspx" target="_blank">Microsoft Security Advisory “DigiNotar” (2607712) Removal</a>.</li>
<li>If you are even more interested into more details; browse here: <a href="http://isc.sans.edu/diary.html?storyid=11500&amp;rss" target="_blank">DigiNotar breach &#8211; the story so far</a>.</li>
</ul>
<h1>Update</h1>
<p>Good news for those who waited to implement the change. There is now an official Microsoft update available:</p>
<p><a href="http://support.microsoft.com/kb/2607712" target="_blank">http://support.microsoft.com/kb/2607712</a></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/247/getting-rid-of-diginotars-root-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to solve conflicting PDF viewer with Internet Explorer</title>
		<link>http://admintube.com/239/how-to-solve-conflicting-pdf-viewer-with-internet-explorer/</link>
		<comments>http://admintube.com/239/how-to-solve-conflicting-pdf-viewer-with-internet-explorer/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 21:35:37 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=239</guid>
		<description><![CDATA[As you might heard or experienced before, it is sometimes annoying to have the Adobe Reader and Adobe Acrobat installed on a terminal server at the same time. In this case you have to decide which program is responsible to be used as the default PDF viewer. While this question can be managed easily through [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>As you might heard or experienced before, it is sometimes annoying to have the Adobe <strong>Reader</strong> and Adobe <strong>Acrobat</strong> installed on a terminal server at the same time. In this case you have to decide which program is responsible to be used as the default PDF viewer.</p>
<p>While this question can be managed easily through file type associations, I am focusing on similar problem today.</p>
<p>I would like to share how I solved a problem regarding the PDF plugin for Internet Explorer, as this is managed through different registry keys than known from file type associations.<span id="more-239"></span></p>
<h2>Example</h2>
<p>The following registry key is controlling which program is used to show PDF files within Internet Explorer (integrated view through plugin).</p>
<pre>[HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe]
@="\"C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe\""</pre>
<h2>The problem: Different requirements for two web based applications</h2>
<p>In my case one applications had a need for the <strong>Adobe Reader</strong> while another application required the <strong>Adobe Acrobat</strong> program as PDF viewer. As the key above was a system key, I had no idea how to handle the problem at the first time.</p>
<h2>The objective: Exceptions for a specific user group</h2>
<p>The aim was to have the Adobe Reader as system default, while some specific users should get a different configuration. Virtualization was not an options for me, because this felt unnecessarily complex and both programs were already installed on my servers.</p>
<h2>The solution: Deploy configuration on user level</h2>
<p>I found out that there is a rare know feature, which I am using now.</p>
<p>For the registry key located under <strong>HKEY_CLASSES_ROOT</strong> there is a <span style="text-decoration: underline;">counterpart within the user part</span> of the registry (<strong>HKEY_CURRENT_USER</strong>).</p>
<p><strong>HKEY_CLASSES_ROOT\Software –&gt; HKEY_CURRENT_USER\SOFTWARE\Classes\Software</strong></p>
<p>As far as I know this key is always queried before the system part is used. I just had to make sure, that my target users are getting the Adobe Acrobat configured here (e.g. through logon script).</p>
<h3>Example:</h3>
<pre>[HKEY_CURRENT_USER\SOFTWARE\Classes\Software\Adobe\Acrobat\Exe]
@="\"C:\\Program Files\\Adobe\\Acrobat 8.0\\Acrobat\\Acrobat.exe\""</pre>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/239/how-to-solve-conflicting-pdf-viewer-with-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bluescreens with McAfee when running Windows 2008, VSE 8.7i with Patch 4, and terminal services</title>
		<link>http://admintube.com/216/bluescreens-with-mcafee-when-running-windows-2008-vse-8-7i-with-patch-4-and-terminal-services/</link>
		<comments>http://admintube.com/216/bluescreens-with-mcafee-when-running-windows-2008-vse-8-7i-with-patch-4-and-terminal-services/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 07:57:06 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=216</guid>
		<description><![CDATA[Since yesterday I noticed that there is an existing problem when you run a terminal server farm within the following environment. Windows 2008 Multi-Language Support Enabled McAfee VSE 8.7 McAfee Patch Level 4 Terminal Services installed. Problem Quote from https://kc.mcafee.com/corporate/index?page=content&#38;id=KB70384&#38;cat=INTERNAL_CATEGORIES&#38;actp=LIST: &#8220;A blue screen error occurs sporadically when VirusScan Enterprise 8.7i with Patch 4 is installed on systems with Windows 2008 [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>Since yesterday I noticed that there is an existing problem when you run a terminal server farm within the following environment.</p>
<ul>
<li>Windows 2008</li>
<li>Multi-Language Support Enabled</li>
<li>McAfee VSE 8.7</li>
<li>McAfee Patch Level 4</li>
<li>Terminal Services installed.<span id="more-216"></span></li>
</ul>
<p><a href="http://admintube.com/wp-content/uploads/BSOD_invalid_process_attach_attempt.jpg"><img class="alignleft size-full wp-image-219" title="BSOD_invalid_process_attach_attempt" src="http://admintube.com/wp-content/uploads/BSOD_invalid_process_attach_attempt.jpg" alt="" width="639" height="476" /></a></p>
<h2>Problem</h2>
<p>Quote from <a href="https://kc.mcafee.com/corporate/index?page=content&amp;id=KB70384&amp;cat=INTERNAL_CATEGORIES&amp;actp=LIST">https://kc.mcafee.com/corporate/index?page=content&amp;id=KB70384&amp;cat=INTERNAL_CATEGORIES&amp;actp=LIST</a>:</p>
<blockquote><p>&#8220;A blue screen error occurs sporadically when VirusScan Enterprise 8.7i  with Patch 4 is installed on systems with Windows 2008 and terminal  services such as Citrix terminal services or Windows Vista with  Fast-User-Switching and where multi-language support has been enabled.&#8221;</p></blockquote>
<p>I found out that this problem is already known for a while. You can find more details in the knowledgebase from McAfee: <a title="Bugcheck 0x5 INVALID_PROCESS_ATTACH_ATTEMPT (when running Windows 2008, VSE 8.7i with Patch 4, and terminal services)" href="https://kc.mcafee.com/corporate/index?page=content&amp;id=KB70384&amp;cat=INTERNAL_CATEGORIES&amp;actp=LIST">Bugcheck 0&#215;5 INVALID_PROCESS_ATTACH_ATTEMPT</a>.</p>
<p>Last update of this article was December 09, 2010. The only workaround available is to downgrade the McAfee Engine back to Patch Level 3.</p>
<h2>Update (3th of February 2011):</h2>
<p>There is now a hotfix available to solve the problem. Please find more details here: <a href="https://kc.mcafee.com/corporate/index?page=content&amp;id=KB70384">https://kc.mcafee.com/corporate/index?page=content&amp;id=KB70384</a></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/216/bluescreens-with-mcafee-when-running-windows-2008-vse-8-7i-with-patch-4-and-terminal-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to manage your XenApp 6 published applications automatically using scripts</title>
		<link>http://admintube.com/131/how-to-manage-your-xenapp-6-published-applications-automatically-using-scripts/</link>
		<comments>http://admintube.com/131/how-to-manage-your-xenapp-6-published-applications-automatically-using-scripts/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 16:45:59 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Citrix XenApp 6]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=131</guid>
		<description><![CDATA[In this article I am going through my experience with Citrix XenApp 6 Published Application management using PowerShell scripts. First off all I need to admit that I am very excited about the new scripting interface provided by XenApp 6. With just a few commands you really can create something powerful. Compared to the old [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>In this article I am going through my experience with Citrix XenApp 6 Published Application management using PowerShell scripts.</p>
<p>First off all I need to admit that I am very excited about the new scripting interface provided by XenApp 6. With just a few commands you really can create something powerful. Compared to the old MFCOM interface it feels like a really major upgrade and to me it is one of the most liked feature they introduced to their new Xenapp version.<span id="more-131"></span></p>
<h2>Assumptions</h2>
<p>As I am already managing my published applications using MFCOM scripts, I had a clear picture of what to achieve with the new PowerShell commands.</p>
<p>Here is a list of things I wanted to get done in my XenApp 6 farm:</p>
<ul>
<li>Create published applications.</li>
<li>Update existing published applications.</li>
<li>Remove published applications.</li>
<li>Create WorkerGroups as needed.</li>
<li>Assign WorkerGroups to published applications.</li>
<li>List all applications in the farm.</li>
</ul>
<p>Fortunately I am happy with just these few tasks. There are much more possibilities. I focus on the most changing part of the farm configuration: Applications… they are created, changed and deleted while the rest of the configuration is very static.</p>
<h2>High Level Script Workflow</h2>
<p>Let me explain my current script workflow before I go into code details.</p>
<p><a href="http://admintube.com/wp-content/uploads/xa6psworkflow.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="xa6psworkflow" src="http://admintube.com/wp-content/uploads/xa6psworkflow_thumb.png" border="0" alt="xa6psworkflow" width="370" height="720" /></a></p>
<h2>Example Citrix PowerShell Commands</h2>
<h3>Load the PowerShell snapins</h3>
<pre class="brush:ps; light:true"># Load the snapins
Add-PSSnapin citrix* -ErrorAction SilentlyContinue</pre>
<p>First of all you have to load the Citrix snapins into your current PowerShell session. I have added “-<strong>ErrorAction SilentlyContinue”</strong> because I am calling my script several times without checking if the snapins are already loaded (actually I don’t know how to do this). Omitting these parameters would lead to an exceptional error message.</p>
<h3>Create list of all existing Citrix farm applications</h3>
<pre class="brush:ps; light:true"># List all applications
Get-XAApplication | foreach { "$($_.FolderPath)/$($_.DisplayName)"}</pre>
<p>This command creates a list with the following format:</p>
<ul>
<li>Applications/Programs/Microsoft Office 2010/Microsoft Excel 2010</li>
<li>Applications/Programs/Microsoft Office 2010/Microsoft OneNote 2010</li>
<li>Applications/Programs/Microsoft Office 2010/Microsoft Winword 2010</li>
</ul>
<p>In my case I needed to extract the <strong>FolderPath</strong> and <strong>DisplayName</strong> because my reference list is in the same format.</p>
<h3>Remove Published Application</h3>
<pre class="brush:ps; light:true">
$BrowserName = “Notepad”
Remove-XAApplication $BrowserName
</pre>
<p>Removing an application is very simple. Just provide the unique BrowserName of the applications.</p>
<h3>Manage WorkerGroups</h3>
<pre class="brush:ps; light:true">$WorkerGroup = “Silo1”
Get-XAWorkerGroup $WorkerGroup –ErrorAction SilentlyContinue</pre>
<p>The <strong>Get-XAWorkerGroup</strong> command is just a check to find if I need to create the WorkerGroup or not, that is why <strong>SilentlyContinue</strong> is included again.</p>
<pre class="brush:ps; light:true">$WorkerGroup = “Silo1”
New-XAWorkerGroup -WorkerGroupName $WorkerGroup</pre>
<p>These lines simply create the <strong>WorkerGroup</strong>.</p>
<h3>Manage Published Applications</h3>
<p>During the development phase of my scripts to manage published applications via PowerShell I found out that I need to support six different scenarios resulting in a different set of parameters.</p>
<ul>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Create(1) or update(2) a <strong>published application</strong> using <strong>WorkerGroups</strong></span></span></li>
<li>
<div style="line-height: normal; margin: 0in;"><span style="font-family: Calibri; color: #000000;">Create(3) or update(4) a <strong>published Desktop</strong> using <strong>WorkerGroups</strong></span></div>
</li>
<li>
<div style="line-height: normal; margin: 0in;"><span style="font-family: Calibri; color: #000000;">Create(5) or update(6) a <strong>published Desktop</strong> using named Servers (<strong>ServerNames</strong>)</span></div>
</li>
</ul>
<p>The following code examples show which parameters to use for the mentioned scenarios.</p>
<h4>Example variables</h4>
<pre class="brush:ps">$EncodedIconData = Get-CtxIcon "C:\Windows\notepad.exe" -index 0
[string]$DisplayName = "Notepad"
[string]$BrowserName = "Notepad"
[string]$CommandLineExecutable = "C:\Windows\notepad.exe"
[string]$WorkingDirectory = "C:\Windows"
[string]$FolderPath = "Applications/Programs"
[string]$ClientFolder = "Programs"
[string]$StartMenuFolder = "Programs"
[string]$WindowType = "95%"
[string]$WorkerGroupNames = "S1"
[string[]]$ServerNames = "Server1"
[string[]]$Accounts = "contoso.com\Domain Users"</pre>
<h4>1. Create a published application using WorkerGroups</h4>
<pre class="brush:ps; light:true">
# create new application
New-XAApplication -EncodedIconData $EncodedIconData -ApplicationType "ServerInstalled" -WorkerGroupNames $WorkerGroupNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -WorkingDirectory $WorkingDirectory -CommandLineExecutable $CommandLineExecutable -FolderPath $FolderPath -ClientFolder $ClientFolder -StartMenuFolder "$StartMenuFolder" -WindowType $WindowType -DisplayName "$DisplayName" -Force -SkipPassThru
&nbsp;
</pre>
<h4>2. Update a published application using WorkerGroups</h4>
<pre class="brush:ps; light:true"># set application
Set-XAApplication -EncodedIconData $EncodedIconData -WorkerGroupNames  $WorkerGroupNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -WorkingDirectory $WorkingDirectory -CommandLineExecutable $CommandLineExecutable -ClientFolder $ClientFolder -StartMenuFolder $StartMenuFolder -WindowType $WindowType
&nbsp;
</pre>
<h4>3. Create a published Desktop using WorkerGroups</h4>
<pre class="brush:ps; light:true"># create new desktop
New-XAApplication -EncodedIconData $EncodedIconData -ApplicationType "ServerDesktop" -WorkerGroupNames  $WorkerGroupNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -FolderPath $FolderPath -ClientFolder $ClientFolder -StartMenuFolder $StartMenuFolder -WindowType $WindowType -DisplayName $DisplayName -Force -SkipPassThru
&nbsp;
</pre>
<h4>4. Update a published Desktop using WorkerGroups</h4>
<pre class="brush:ps; light:true"># set application
Set-XAApplication -EncodedIconData $EncodedIconData -WorkerGroupNames  $WorkerGroupNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -ClientFolder $ClientFolder -StartMenuFolder $StartMenuFolder -WindowType $WindowType
&nbsp;
</pre>
<h4>5. Create a <strong>published Desktop</strong> using named Servers (ServerNames)</h4>
<pre class="brush:ps; light:true"># create new desktop
New-XAApplication -EncodedIconData $EncodedIconData -ApplicationType "ServerDesktop" -ServerNames  $ServerNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -FolderPath $FolderPath -ClientFolder $ClientFolder -StartMenuFolder $StartMenuFolder -WindowType $WindowType -DisplayName $DisplayName -Force -SkipPassThru
&nbsp;
</pre>
<h4>6. Update a published Desktop using named Servers (ServerNames)</h4>
<pre class="brush:ps; light:true">
# set application
Set-XAApplication -EncodedIconData $EncodedIconData -ServerNames  $ServerNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -ClientFolder $ClientFolder -StartMenuFolder $StartMenuFolder -WindowType $WindowType
&nbsp;
</pre>
<h4>Complete Example to create a published application</h4>
<pre class="brush:ps;"># Load Snapins
Add-PSSnapin citrix* -ErrorAction SilentlyContinue

# Set application values
$EncodedIconData = Get-CtxIcon "C:\Windows\notepad.exe" -index 0
[string]$DisplayName = "Notepad"
[string]$BrowserName = "Notepad"
[string]$CommandLineExecutable = "C:\Windows\notepad.exe"
[string]$WorkingDirectory = "C:\Windows"
[string]$FolderPath = "Applications/Programs"
[string]$ClientFolder = "Programs"
[string]$StartMenuFolder = "Programs"
[string]$WindowType = "95%"
[string]$WorkerGroupNames = "S1"
[string[]]$ServerNames = "Server1"
[string[]]$Accounts = "contoso.com\Domain Users"

# Create WorkerGroup
New-XAWorkerGroup -WorkerGroupName $WorkerGroupNames 

# Create applications
New-XAApplication -EncodedIconData $EncodedIconData -ApplicationType "ServerInstalled" -WorkerGroupNames $WorkerGroupNames -BrowserName $BrowserName -Enabled $TRUE -Accounts $Accounts -WorkingDirectory $WorkingDirectory -CommandLineExecutable $CommandLineExecutable -FolderPath $FolderPath -ClientFolder $ClientFolder -StartMenuFolder "$StartMenuFolder" -WindowType $WindowType -DisplayName "$DisplayName" -Force -SkipPassThru
&nbsp;
</pre>
<h2>Lessons Learned</h2>
<p>If you are new to Citrix scripting the following shared experience might be useful for you:</p>
<h3>Browsername vs. Display Name</h3>
<p>The Browsername parameter for some scripting commands is a <strong>farm wide unique name</strong> for an published application, while the Display name can be there twice. The Display name just has to be <strong>unique within the same application folder</strong>. Just keep this in mind while you script.</p>
<h3>Published Application Icon</h3>
<p>If you extract Icons using the <strong>Get-CtxIcon</strong> command you always should use the parameter <strong>“-index 0”</strong>.</p>
<p>I had some troubles not using this parameter at the beginning. Omitting this parameter will extract all available icon data from a given file. This possibly will cause a problem with the New-XAApplication command for unknown reasons. I guess that there is a limit on the input parameter.</p>
<h2>Interesting resources</h2>
<p>Here are some other web resources I found. It is highly recommended to install the Citrix XenApp 6 PowerShell SDK which includes the complete documentation of the scripting interface.</p>
<p><strong>XenApp 6 PowerShell SDK</strong>: <a href="http://community.citrix.com/display/xa/XenApp+6+PowerShell+SDK">http://community.citrix.com/display/xa/XenApp+6+PowerShell+SDK</a></p>
<p><strong>XenApp PowerShell SDK QA</strong>: <a href="http://community.citrix.com/display/ocb/2010/08/31/XenApp+PowerShell+SDK+QA">http://community.citrix.com/display/ocb/2010/08/31/XenApp+PowerShell+SDK+QA</a></p>
<p><strong>How to Install the Citrix XenApp 6 PowerShell Cmdlets</strong>: <a href="http://www.jasonconger.com/post/How-to-Install-the-Citrix-XenApp-6-PowerShell-Cmdlets.aspx">http://www.jasonconger.com/post/How-to-Install-the-Citrix-XenApp-6-PowerShell-Cmdlets.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/131/how-to-manage-your-xenapp-6-published-applications-automatically-using-scripts/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to use usrlogon.cmd on a 64-Bit System as Logonscript</title>
		<link>http://admintube.com/114/how-to-use-usrlogon-cmd-on-a-64-bit-system-as-logonscript/</link>
		<comments>http://admintube.com/114/how-to-use-usrlogon-cmd-on-a-64-bit-system-as-logonscript/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 20:49:00 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Citrix XenApp 6]]></category>
		<category><![CDATA[64-Bit]]></category>
		<category><![CDATA[citrix]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=114</guid>
		<description><![CDATA[Today I faced a funny problem while implementing my logonscript for the terminal server. Normally I replace the default usrlogon.cmd script which resides in C:\Windows\System32 What I needed to realize soon is that citrix still uses 32-Bit programs in the background. One example I had to learn the hard way is that the Citrix provided [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>Today I faced a funny problem while implementing my logonscript for the terminal server. Normally I replace the default <strong>usrlogon.cmd</strong> script which resides in <span style="text-decoration: underline;">C:\Windows\System32</span> What I needed to realize soon is that <strong>citrix still uses 32-Bit</strong> programs in the background.</p>
<p>One example I had to learn the hard way is that the Citrix provided <strong>ctxhide.exe</strong> program is still compiled as 32-Bit program. As we already <a title="A small list of things to know when you are new to 64-Bit Windows 2008 R2" href="http://admintube.com/18/a-small-list-of-things-to-know-when-you-are-new-to-64-bit-windows-2008-r2/">know</a> there is a filesystem redirection in place which tells 32-Bit programs to find their &#8220;<span style="text-decoration: underline;">SYSTEM32</span>&#8221; under <span style="text-decoration: underline;">C:\Windows\SySWoW64</span>.</p>
<p><span id="more-114"></span></p>
<h3>ctxhide.exe will use SySWoW64!</h3>
<p>So, if you are running XenApp6 on Windows 2008 R2 (64-Bit) this results in a situation that the following path is used to execute the <strong>usrlogon.cmd</strong> script</p>
<p><code>C:\Windows\SySWoW64\usrlogon.cmd</code></p>
<p>This may get important if you are migrating to a 64-Bit platform like I do.</p>
<h3>How to replace the standard usrlogon.cmd script?</h3>
<p>Before I was able to replace the usrlogon.cmd script, I needed to take the ownership of the file. Otherwise the access will be denied by the system.</p>
<p>1) I used the following <a title="Home of SetAcl" href="http://helgeklein.com/setacl/">SetAcl</a> command to set the owner of the file to the local Administrators group:</p>
<p><code>setacl -on "C:\Windows\SySWoW64\usrlogon.cmd" -ot file -actn setowner -ownr "n:S-1-5-32-544;s:y"</code></p>
<p>2) Than I give System and the local Administrators group full access, and local Users read and execute permission:</p>
<p><code>setacl -on "C:\Windows\SySWoW64\usrlogon.cmd" -ot file -actn rstchldrn -rst "dacl,sacl" -actn setprot -op "dacl:p_nc" -actn ace -ace "n:S-1-5-32-544;s:y;p:full" -actn ace -ace "n:S-1-5-18;s:y;p:full" -actn ace -ace "n:$group;s:n;p:$Permission" -actn clear -clr "dacl,sacl"</code></p>
<p>By the way: There is an old citrix knowledgebase article which already describes this behaviour.</p>
<h3>Additional Information</h3>
<p><a href="http://support.citrix.com/article/CTX108901">http://support.citrix.com/article/CTX108901</a> (Usrlogon.cmd Does Not Execute on Presentation Server for Windows x64)</p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/114/how-to-use-usrlogon-cmd-on-a-64-bit-system-as-logonscript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>XenApp 5 to XenApp 6: Preparing for Windows 2008 R2</title>
		<link>http://admintube.com/118/xenapp-5-to-xenapp-6-preparing-for-windows-2008-r2/</link>
		<comments>http://admintube.com/118/xenapp-5-to-xenapp-6-preparing-for-windows-2008-r2/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 21:40:00 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Citrix XenApp 6]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://admintube.com/118/xenapp-5-to-xenapp-6-preparing-for-windows-2008-r2/</guid>
		<description><![CDATA[Today I had a look on how to prepare my environment for Windows 2008 R2. It seems there are some changes required to adopt my current unattended installation. The following lines represents my first analyze I did on my existing packages. My starting point is my current full automated server installation based on Windows 2008 [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>Today I had a look on how to prepare my environment for Windows 2008 R2. It seems there are some changes required to adopt my current unattended installation. The following lines represents my first analyze I did on my existing packages.</p>
<p>My starting point is my current full automated server installation based on Windows 2008 running with XenApp 5. So, I just took my packages and reviewed them with the following questions in mind:</p>
<ul>
<li>Which install routines can be reused without any modifications? </li>
<li>Which install routines need to be modified? </li>
<li>Which install routines are obsolete? </li>
</ul>
<p>  <span id="more-118"></span><br />
<h3>Analysis results</h3>
<h5>Windows Update Agent</h5>
<p><i>Old</i></p>
<p>I used to install the current Windows Update Agent with the following command:</p>
<pre>	windowsupdateagent30-x86.exe /WuForce /Quiet /NoRestart</pre>
<p><i>New</i></p>
<p>There is a dedicated client available for 64-Bit based systems; the setup is the same</p>
<pre>	windowsupdateagent30-x64.exe /WuForce /Quiet /NoRestart</pre>
<h5>Windows Terminal Services</h5>
<p><i>Old</i> </p>
<p>With Windows 2008 I used the following commands to install the terminal services:</p>
<pre>servermanagercmd -install Application-Server<br />servermanagercmd -install AS-Ent-Services<br />servermanagercmd -install TS-Terminal-Server</pre>
<p><i>New</i></p>
<p>With<b> Windows 2008 R2</b> it is still possible to use these commands. But if you use the ServerManagerCMD you will get the following message:</p>
<p>&quot;Servermanagercmd.exe is deprecated, and is not guaranteed to be supported in future releases of Windows. We recommend that you use the Windows PowerShell cmdlets that are available for Server Manager.&quot;</p>
<p>Also features were renamed. I am using now the following Powershell commands to prepare my servers for XenApp 6</p>
<pre>import-module servermanager<br />add-windowsfeature application-server<br />add-windowsfeature RDS-RD-Server</pre>
<p>If you install the <b>Remote Desktop Services</b> the <b>Internet Explorer Hardening </b>feature will automatically being disabled for users. This was not the case with Windows 2008</p>
<h5>.Net Framework 3.5</h5>
<p>There is no need any more to install the .Net Framework 3.5 separately. The framework is now a feature of windows and gets automatically installed if you install the Remote Desktop Services feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/118/xenapp-5-to-xenapp-6-preparing-for-windows-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoying shortcuts in Microsoft Office 2010</title>
		<link>http://admintube.com/52/annoying-shortcuts-in-microsoft-office-2010/</link>
		<comments>http://admintube.com/52/annoying-shortcuts-in-microsoft-office-2010/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 06:29:49 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Applications]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=52</guid>
		<description><![CDATA[If you install Microsoft you may recognize that the start menu does not contain the shortcuts you maybe expected. As you can see target is empty. This is very annoying if you need the full path for publishing in Citrix XenApp farm or to build up your custom start menu. Here is a list of [...]]]></description>
				<content:encoded><![CDATA[<p></p><p>If you install Microsoft you may recognize that the start menu does not contain the shortcuts you maybe expected. As you can see target is empty.<span id="more-52"></span></p>
<p><a href="http://admintube.com/wp-content/uploads/MSOfficeLNK.jpg"><img class="alignnone size-medium wp-image-53" title="MSOfficeLNK" src="http://admintube.com/wp-content/uploads/MSOfficeLNK-212x300.jpg" alt="" width="212" height="300" /></a></p>
<p>This is very annoying if you need the full path for publishing in Citrix XenApp farm or to build up your custom start menu.</p>
<p>Here is a list of Microsoft Office 2010 programs and their path to the executable in the file system:</p>
<div>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>Microsoft Office   2010 Tools\Microsoft Office 2010 Language Preferences</td>
<td>C:\Program   Files\Microsoft Office\Office14\SETLANG.EXE</td>
</tr>
<tr>
<td>Microsoft Office   2010 Tools\Microsoft Office Picture Manager</td>
<td>C:\Program   Files\Microsoft Office\Office14\OIS.EXE</td>
</tr>
<tr>
<td>Microsoft Access   2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\MSACCESS.EXE</td>
</tr>
<tr>
<td>Microsoft Excel   2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\EXCEL.EXE</td>
</tr>
<tr>
<td>Microsoft InfoPath   Designer 2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\INFOPATH.EXE /design</td>
</tr>
<tr>
<td>Microsoft InfoPath   Filler 2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\INFOPATH.EXE</td>
</tr>
<tr>
<td>Microsoft OneNote   2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\ONENOTE.EXE</td>
</tr>
<tr>
<td>Microsoft Outlook   2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\OUTLOOK.EXE</td>
</tr>
<tr>
<td>Microsoft   PowerPoint 2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\POWERPNT.EXE</td>
</tr>
<tr>
<td>Microsoft   Publisher 2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\MSPUB.EXE</td>
</tr>
<tr>
<td>Microsoft   SharePoint Workspace 2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\GROOVE.EXE</td>
</tr>
<tr>
<td>Microsoft Word   2010</td>
<td>C:\Program   Files\Microsoft Office\Office14\WINWORD.EXE</td>
</tr>
</tbody>
</table>
</div>
<p>…</p>
<blockquote class="left"><p>Why do I write about this?</p></blockquote>
<p>The answer is simple because I already looked up this information several times in my life to get to know what the executable name for an office application is. Maybe I should do more brain training instead of blogging about <img src='http://admintube.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/52/annoying-shortcuts-in-microsoft-office-2010/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A small list of things to know when you are new to 64-Bit Windows 2008 R2</title>
		<link>http://admintube.com/18/a-small-list-of-things-to-know-when-you-are-new-to-64-bit-windows-2008-r2/</link>
		<comments>http://admintube.com/18/a-small-list-of-things-to-know-when-you-are-new-to-64-bit-windows-2008-r2/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 21:56:20 +0000</pubDate>
		<dc:creator>Stefan Bärthel</dc:creator>
				<category><![CDATA[Windows 2008 R2]]></category>
		<category><![CDATA[64-Bit]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://admintube.com/?p=18</guid>
		<description><![CDATA[Below you find a small compilation of things you should know when you work with 64-Bit the first time. Having this in mind can help you fighting against applications phenomena. System files and windows programs of the 64-Bit OS are still located in C:\Windows\System32. A 32-Bit program that accesses C:\Windows\System32 will be redirected to C:\Windows\SysWOW64 [...]]]></description>
				<content:encoded><![CDATA[<p></p><div id="attachment_22" class="wp-caption alignright" style="width: 300px">
	<a href="http://admintube.com/wp-content/uploads/2010/10/64-bit.jpg"><img class="size-medium wp-image-22" title="64-bit" src="http://admintube.com/wp-content/uploads/2010/10/64-bit-300x232.jpg" alt="" width="300" height="232" /></a>Photo by <a href="http://www.flickr.com/photos/visulogik">visulogik</a>
	<p class="wp-caption-text"> </p>
</div>
<p>Below you find a small compilation of things you should know when you work with 64-Bit the first time. Having this in mind can help you fighting against applications phenomena.<span id="more-18"></span></p>
<ul>
<li>System files and windows programs of the 64-Bit OS are still located in <strong>C:\Windows\System32.</strong></li>
</ul>
<ul>
<li> A 32-Bit program that accesses C:\Windows\System32 will be redirected to <strong>C:\Windows\SysWOW64</strong> in background (the software does not know).</li>
</ul>
<ul>
<li> Some windows integrated programs exist as 32-Bit and 64-Bit version. Notepad.exe for example can be found in C:\Windows\SysWOW64 and C:\Windows\System32.</li>
</ul>
<ul>
<li> 32-Bit Programs will be installed to<strong> C:\Program files (x86)</strong>.</li>
</ul>
<ul>
<li> Registry Class-ID&#8217;s are redirected to <strong>HKLM:\Software\Wow6432Node\Classes\CLSID.</strong></li>
</ul>
<p class="alert">Remember: <strong>Only</strong> 64-Bit programs see the real environment as it is. 32-Bit programs only see a simulated environment through redirection mechanisms. Pay attention to the points above if you do critical stuff with a 32-Bit program.</p>
<p>This is just a small help.</p>
<p>Please see these links for more background information:</p>
<p><a title="64-Bit Windows (x64)" href="http://www.sepago.de/d/sepago-backstage/blogs/category/64-bit-windows-x64">64-Bit Windows (x64)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://admintube.com/18/a-small-list-of-things-to-know-when-you-are-new-to-64-bit-windows-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
