<?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>Blog &#8211; Virtual Engine Ltd</title>
	<atom:link href="https://virtualengine.co.uk/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtualengine.co.uk</link>
	<description></description>
	<lastBuildDate>Mon, 17 Aug 2015 19:30:11 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://virtualengine.co.uk/wp-content/uploads/2023/02/velogo-100x100.jpeg</url>
	<title>Blog &#8211; Virtual Engine Ltd</title>
	<link>https://virtualengine.co.uk</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>App-V 5 Configuration Editor (ACE) v1.4 Released!</title>
		<link>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-4-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app-v-5-configuration-editor-ace-v1-4-released</link>
					<comments>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-4-released/#comments</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Mon, 17 Aug 2015 19:30:11 +0000</pubDate>
				<category><![CDATA[ACE]]></category>
		<category><![CDATA[App-V]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Latest News]]></category>
		<category><![CDATA[App-V 5]]></category>
		<category><![CDATA[AppV 5]]></category>
		<category><![CDATA[AppV5]]></category>
		<category><![CDATA[deploymentconfig.xml]]></category>
		<category><![CDATA[Dynamic Configuration]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[userconfig.xml]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3721</guid>

					<description><![CDATA[Virtual Engine are pleased to announce the version 1.4 release of the App-V 5 Configuration Editor (ACE). This (free) utility provides a simple user interface for editing App-V 5 dynamic configuration and manifest files, without manually hacking the underlying XML files. This release requires Microsoft .NET Framework 4.5 or above and contains several reported bug &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-4-released/" class="more-link">Continue reading<span class="screen-reader-text"> "App-V 5 Configuration Editor (ACE) v1.4 Released!"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://virtualengine.co.uk/wp-content/uploads/ACE-256px_thumb.png"><img decoding="async" class="alignright wp-image-2983 size-thumbnail" src="https://virtualengine.co.uk/wp-content/uploads/ACE-256px_thumb-150x150.png" alt="ACE-256px_thumb.png" width="150" height="150" /></a>Virtual Engine are pleased to announce the version 1.4 release of the <a href="https://virtualengine.co.uk/vet/ace/">App-V 5 Configuration Editor (ACE)</a>. This (free) utility provides a simple user interface for editing App-V 5 dynamic configuration and manifest files, without manually hacking the underlying XML files.</p>
<p>This release requires <strong>Microsoft .NET Framework 4.5</strong> or above and contains several reported bug fixes along with:</p>
<ul>
<li>Support for <strong>App-V 5.1 </strong>(See excellent <a href="http://virtualvibes.co.uk/app-v-5-1-the-feature-run-down" target="_blank">blog post</a> by <a href="https://twitter.com/ThamimKarim" target="_blank">@ThamimKarim </a>for a run down of what&#8217;s new in App-V 5.1);</li>
<li>Ability to modify <strong>AppxManifest</strong> files to support the <strong>App-V 5.1</strong> sequencer <strong>Export/Import</strong> feature;</li>
<li>New <strong>Applications</strong> tab has been added, where you can <strong>Enable</strong> or <strong>Disable</strong> applications when published;</li>
<li>Improved <strong>Error checking</strong> for missing data;</li>
<li>New setting added to the <strong>User</strong> and <strong>Machine</strong> scripts that enables scripts to <strong>Run Asynchronously</strong>;</li>
<li><strong>Tool tips</strong> added to explain what various settings or options will do;</li>
<li>New options added to the <strong>Shortcuts Context Menu</strong> that make it even easier to add new shortcuts;</li>
<li>Ability to pop-out the <strong>Generated XML</strong> and <strong>Source XML </strong>into a separate viewable window;</li>
<li><strong>Comments</strong> have been added in the <strong>Generated XML</strong> file to make it easier to read each section;</li>
<li><strong>Drag and Drop</strong> support has been added to open the dynamic configuration files;</li>
<li>Ability to save the Generated XML for use in <a href="http://www.appvscheduler.com/" target="_blank">App-V Scheduler</a>.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-4-released/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Mocking Missing Cmdlet ErrorAction with Pester</title>
		<link>https://virtualengine.co.uk/mocking-missing-cmdlet-erroraction-with-pester/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mocking-missing-cmdlet-erroraction-with-pester</link>
					<comments>https://virtualengine.co.uk/mocking-missing-cmdlet-erroraction-with-pester/#comments</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Mon, 08 Jun 2015 12:21:27 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Cmdlet]]></category>
		<category><![CDATA[ErrorAction]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Mock]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[Pester]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3739</guid>

					<description><![CDATA[Following on from the previous Mocking Missing Cmdlets with Pester post, I also encountered another interesting problem when attempting to mock cmdlets that were not present on the test system. This one is more of an edge-case, hence its own post. Just like last time, the tests worked when I had the Hyper-V cmdlets installed, but &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/mocking-missing-cmdlet-erroraction-with-pester/" class="more-link">Continue reading<span class="screen-reader-text"> "Mocking Missing Cmdlet ErrorAction with Pester"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Following on from the previous <a href="https://virtualengine.co.uk/2015/mocking-missing-cmdlets-with-pester/">Mocking Missing Cmdlets with Pester</a> post, I also encountered another interesting problem when attempting to mock cmdlets that were not present on the test system. This one is more of an edge-case, hence its own post. Just like last time, the tests worked when I had the Hyper-V cmdlets installed, but failed when running within an Appveyor VM.</p>
<p>It’s probably not uncommon that you will need to ensure that the code under test should throw an error here-and-there. Here is a pseudo-example that tests that Get-VM writes an error when passed with a non-existent VM name:</p>
<pre class="lang:ps decode:true ">Describe 'Mocking ErrorAction Example' {
    Function Get-VM { param ($Name) }
    InModuleScope 'xVMHyper-V' {

        It 'Get-VM Throws' {
            Mock Get-VM -ParameterFilter { $Name -eq 'TestVM' } -MockWith { Write-Error 'Oops' }
            { Get-VM -Name 'TestVM' -ErrorAction Stop } | Should Throw;
        }
    }
}</pre>
<p>When this test is run it fails:</p>
<pre class="lang:ps decode:true ">Describing Mocking ErrorAction Example
 Write-Error 'Oops'  : Oops
At C:\Program Files\WindowsPowerShell\Modules\Pester\Functions\Mock.ps1:709 char:21
+                     &amp; $___ScriptBlock___ @___BoundParameters___ @___ArgumentList ...
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException 
 [-] Get-VM Throws 176ms
   Expected: the expression to throw an exception
   at line: 6 in D:\Users\Iain\Desktop\PesterDemo.Tests.ps1
Tests completed in 176ms
Passed: 0 Failed: 1 Skipped: 0 Pending: 0</pre>
<p>The problem here is that the stub function is <span style="text-decoration: underline;">not</span> an advanced function and the –ErrorAction preference switch is ignored! This is easily resolved by adding the [CmdletBinding()] attribute to the stub function definition:</p>
<pre class="lang:ps decode:true ">Describe 'Mocking ErrorAction Example' {
    Function Get-VM { [CmdletBinding()] param ($Name) }
    InModuleScope 'xVMHyper-V' {

        It 'Get-VM Throws' {
            Mock Get-VM -ParameterFilter { $Name -eq 'TestVM' } -MockWith { Write-Error 'Oops' }
            { Get-VM -Name 'TestVM' -ErrorAction Stop } | Should Throw;
        }
    }
}</pre>
<p>Running the test now results in the expected output:</p>
<pre class="lang:ps decode:true ">Describing Mocking ErrorAction Example
 [+] Get-VM Throws 177ms
Tests completed in 177ms
Passed: 1 Failed: 0 Skipped: 0 Pending: 0</pre>
<p>This is not a Pester issue and it’s not a Powershell issue either. It’s just the way the normal Powershell functions work. But, just in case someone else runs into it I thought it would be worth quickly documenting!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/mocking-missing-cmdlet-erroraction-with-pester/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Mocking Missing Cmdlets with Pester</title>
		<link>https://virtualengine.co.uk/mocking-missing-cmdlets-with-pester/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mocking-missing-cmdlets-with-pester</link>
					<comments>https://virtualengine.co.uk/mocking-missing-cmdlets-with-pester/#comments</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Mon, 08 Jun 2015 12:16:45 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Cmdlet]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Mock]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[Pester]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3735</guid>

					<description><![CDATA[When writing Pester unit tests for your Powershell code you will probably have a need to mock calls to external functions before too long. This process works as you would expect when Pester can locate a defined function/cmdlet with a matching name. However, if Pester cannot find a definition, it will fail. This problem will &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/mocking-missing-cmdlets-with-pester/" class="more-link">Continue reading<span class="screen-reader-text"> "Mocking Missing Cmdlets with Pester"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>When writing <a href="https://github.com/pester/Pester" target="_blank">Pester </a>unit tests for your Powershell code you will probably have a need to mock calls to external functions before too long. This process works as you would expect when Pester can locate a defined function/cmdlet with a matching name. However, if Pester cannot find a definition, it will fail.</p>
<p>This problem will normally surface in a Continuous Integration (CI) environment. For me, it was writing the first suite of tests for the <a href="https://github.com/PowerShell/xHyper-V" target="_blank">xHyper-V DSC resource</a> module. The Hyper-V cmdlets where present on my authoring machine but were not present on the <a href="http://www.appveyor.com/" target="_blank">Appveyor</a> build VM.</p>
<p>Here is an overly simplified Pester test that I’ll use for demonstration purposes:</p>
<pre class="lang:ps decode:true ">Describe 'Missing Cmdlet Mocking Example' {
    InModuleScope 'xVMHyper-V' {

        It 'Calls Get-VM' {
            Mock Get-VM -MockWith { }
            Get-VM -Name 'TestVM';
            Assert-MockCalled Get-VM -Scope It;
        }

    }
}
</pre>
<p>If we run the test and Pester cannot locate a defined function then it will report an error. <strong>Note: if you run this on a machine with the Hyper-V module installed (and you have a VM called ‘TestVM’) then it will pass – but you knew that already ;).</strong></p>
<pre class="lang:ps decode:true ">Describing Missing Cmdlet Mocking Example
 [-] calls Get-VM 474ms
   Could not find Command Get-VM
   at line: 600 in C:\Program Files\WindowsPowerShell\Modules\Pester\Functions\Mock.ps1
Tests completed in 474ms
</pre>
<p>This is easily overcome by defining an empty function within the test file. <strong>Note: this will need to be defined within the ‘InModuleScope’ script block if you’re testing a module’s internals.</strong></p>
<pre class="lang:ps decode:true">Describe 'Missing Cmdlet Mocking Example' {
    InModuleScope 'xVMHyper-V' {

        Function Get-VM { }

        It 'Calls Get-VM' {
            Mock Get-VM -MockWith { }
            Get-VM -Name 'TestVM';
            Assert-MockCalled Get-VM -Scope It;
        }

    }
}
</pre>
<p>The test now passes as we would expect. Yay \o/</p>
<pre class="lang:ps decode:true ">Describing Missing Cmdlet Mocking Example
 [+] Calls Get-VM 141ms
Tests completed in 141ms
Passed: 1 Failed: 0 Skipped: 0 Pending: 0</pre>
<p>Now, what you really need to know is that for Pester to enumerate and mock parameter filters, <strong>those parameters need to be defined on the stub function</strong>. If we were to update the test to check for the passing of a particular –Name parameter like so:</p>
<pre class="lang:ps decode:true ">Describe 'Missing Cmdlet Mocking Example' {
    InModuleScope 'xVMHyper-V' {

        Function Get-VM { }

        It 'Calls Get-VM' {
            Mock Get-VM –ParameterFilter { $Name –eq ‘TestVM } -MockWith { }
            Get-VM -Name 'TestVM';
            Assert-MockCalled Get-VM –ParameterFilter { $Name –eq ‘TestVM’ } -Scope It;
        }

    }
}</pre>
<p>When we run the test it will now fail again.</p>
<pre class="lang:ps decode:true ">Describing Missing Cmdlet Mocking Example
 [-] Calls Get-VM 131ms
   Expected Get-VM to be called at least 1 times but was called 0 times
   at line: 518 in C:\Program Files\WindowsPowerShell\Modules\Pester\Functions\Mock.ps1
Tests completed in 131ms
Passed: 0 Failed: 1 Skipped: 0 Pending: 0</pre>
<p>For Pester to enumerate the dynamic parameters on the function, it needs to have the parameters (only the one’s you’re interested in) defined. This can easily be fixed like so:</p>
<pre class="lang:ps decode:true ">Describe 'Missing Cmdlet Mocking Example' {
    InModuleScope 'xVMHyper-V' {

        Function Get-VM { param ($Name) }

        It 'Calls Get-VM' {
            Mock Get-VM –ParameterFilter { $Name –eq ‘TestVM } -MockWith { }
            Get-VM -Name 'TestVM';
            Assert-MockCalled Get-VM –ParameterFilter { $Name –eq ‘TestVM’ } -Scope It;
        }

    }
}</pre>
<p>The tests will now once again pass successfully!</p>
<pre class="lang:ps decode:true ">Describing Missing Cmdlet Mocking Example
 [+] Calls Get-VM 169ms
Tests completed in 169ms
Passed: 1 Failed: 0 Skipped: 0 Pending: 0</pre>
<p>Hopefully this helps someone and saves some time. It took me a while to work out what was going on as I had the cmdlets available on my development machine but the tests were failing when running in an Appveyor VM. Perhaps I should submit a pull request to get this put into the Pester help documentation?!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/mocking-missing-cmdlets-with-pester/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Let&#8217;s Get Chocolatey</title>
		<link>https://virtualengine.co.uk/lets-get-chocolatey/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lets-get-chocolatey</link>
					<comments>https://virtualengine.co.uk/lets-get-chocolatey/#respond</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Thu, 07 May 2015 10:15:21 +0000</pubDate>
				<category><![CDATA[ACE]]></category>
		<category><![CDATA[App-V]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[VET]]></category>
		<category><![CDATA[Chocolatey]]></category>
		<category><![CDATA[OneGet]]></category>
		<category><![CDATA[Package Management]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3629</guid>

					<description><![CDATA[It’s taken a little while, but we are pleased to announce that the Virtual Engine Toolkit (VET) and the App-V Configuration Editor (ACE) are now available on Chocolatey! If you have Chocolatey installed on your systems then you can get going by running the commands listed below. Microsoft Package Management It gets even better if &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/lets-get-chocolatey/" class="more-link">Continue reading<span class="screen-reader-text"> "Let&#8217;s Get Chocolatey"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>It’s taken a little while, but we are pleased to announce that the Virtual Engine Toolkit (VET) and the App-V Configuration Editor (ACE) are now available on Chocolatey! If you have Chocolatey installed on your systems then you can get going by running the commands listed below.</p>
<p><img decoding="async" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://virtualengine.co.uk/wp-content/uploads/chocolatey.png" alt="image" border="0" /></p>
<h4>Microsoft Package Management</h4>
<p>It gets even better if you’re running the <a href="http://windows.microsoft.com/en-us/windows/preview-iso" target="_blank">Windows 10 Insider preview</a>, the latest <a href="http://www.microsoft.com/en-us/download/details.aspx?id=46889" target="_blank">WMF 5.0 April 2015 preview</a> or have installed the latest <a href="http://oneget.org/install-oneget.exe" target="_blank">experimental OneGet build</a> on Windows 7 and up, you can download these directly – today!</p>
<p>To do this, run the <strong>Install-Package ace</strong> or <strong>Install-Package vet</strong> commands, like so:</p>
<h4><img decoding="async" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://virtualengine.co.uk/wp-content/uploads/onegetace.png" alt="image" border="0" /><br />
Other Packages</h4>
<p>It doesn’t end here though. We have also published the following packages that you might find useful to the public Chocolatey feed:</p>
<ul>
<li>Citrix-Receiver &#8211; <a href="https://chocolatey.org/packages/citrix-receiver" target="_blank">https://chocolatey.org/packages/citrix-receiver</a></li>
<li>Citrix-XenServer-SDK &#8211; <a href="https://chocolatey.org/packages/citrix-xenserver-sdk" target="_blank">https://chocolatey.org/packages/citrix-xenserver-sdk</a></li>
<li>AppvManage &#8211; <a href="https://chocolatey.org/packages/appvmanage" target="_blank">https://chocolatey.org/packages/appvmanage</a></li>
</ul>
<p>Now &#8211; go get Chocolatey <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/lets-get-chocolatey/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Testing Private Functions with Pester</title>
		<link>https://virtualengine.co.uk/testing-private-functions-with-pester/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=testing-private-functions-with-pester</link>
					<comments>https://virtualengine.co.uk/testing-private-functions-with-pester/#respond</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Wed, 14 Jan 2015 10:31:00 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Pester]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3604</guid>

					<description><![CDATA[We’ve been busy beavering away on a new Powershell module that is comprised of many .ps1 files, that are loaded by a master/control .psm1 file when the module is imported. And, like all good Powershell citizens, we have many Pester unit tests for this code in accompanying .Tests.ps1 files. As Powershell script modules permit us &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/testing-private-functions-with-pester/" class="more-link">Continue reading<span class="screen-reader-text"> "Testing Private Functions with Pester"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>We’ve been busy beavering away on a new Powershell module that is comprised of many .ps1 files, that are loaded by a master/control .psm1 file when the module is imported. And, like all good Powershell citizens, we have many <a href="https://github.com/pester/Pester" target="_blank">Pester</a> unit tests for this code in accompanying .Tests.ps1 files.</p>
<p>As Powershell script modules permit us to control which functions should be exported with Export-ModuleMember and Pester allows us to test non-exported functions with the InModuleScope option, you might be wondering why we would ever need to be able to test private/internal functions?</p>
<h4>Script Bundles</h4>
<p>Whilst coding the new Powershell module, we have always had the desire to ensure that it could also be used as a ‘bundled’ .ps1 file. By bundle, we mean a single combined .ps1 file that can be included verbatim at the beginning of an existing script or by dot-sourcing it as required. Unfortunately &#8211; in this particular scenario – the internal module functions would be exposed and could potentially cause unnecessary confusion.</p>
<p>Here’s an example where both the ‘PublicFunction’ and ‘InnerPrivate’ functions would be exposed when bundled or dot-sourced into an existing .ps1 file.</p>
<pre class="lang:ps decode:true">function InnerPrivate {
    param ()
    Write-Output ‘InnerPrivate’
}

function PublicFunction {
    param()
    Write-Output (InnerPrivate)
}</pre>
<p>If we only want the ‘PublicFunction’ visible then the simple solution to this is to nest the private function(s) inside the public function(s) like so:</p>
<pre class="lang:ps decode:true">function PublicFunction {
    param()

    function InnerPrivate {
        param ()
        Write-Output ‘InnerPrivate’
    }

   Write-Output (InnerPrivate)
}</pre>
<p>Now only the ‘PublicFunction’ will be available. End of the story?</p>
<h4>Internal Functions</h4>
<p>Not quite; by hiding the functions we now cannot test them with Pester. I had a very brief <a href="https://github.com/pester/Pester/issues/247" target="_blank">conversation with Dave Wyatt on GitHub</a> about this and it was agreed that this functionality should not be a part of the official Pester release.</p>
<p>To solve this particular issue, we have a simple function that will locate and return a function’s definition from within a .ps1 file as a script block. The function definition can then be dot-sourced into the current Pester scope to enable testing. Here’s an example Pester test file that will test our ‘InnerPrivate’ function:</p>
<pre class="lang:ps decode:true">$here = Split-Path –Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path –Leaf $MyInvocation.MyCommand.Path).Replace(“.Tests.”, “.”)
# If only testing an internal function, there is no need to dot-source the entire contents..

Describe “InnerPrivate” {
    # Import the ‘InnerPrivate’ function into the current scope
    . (Get-FunctionDefinition –Path “$here\$sut” –Function InnerPrivate)

    It “tests the private, inner function” {
        InnerPrivate | Should Be ‘InnerPrivate’
    }
}</pre>
<p>If this code is of interest you can simply save the following code as a .ps1 file in Pester’s \Function directory, for example \Functions\FunctionDefinition.ps1, and Pester will automatically load it.</p>
<h4>Notes:</h4>
<ol>
<li>As this code utilises the Abstract Syntax Tree (AST) it does require Powershell 3.0;</li>
<li>If there are any dependencies on variables in the function&#8217;s parent scope these will need to be mocked/accounted for;</li>
<li>Depending on how you install/update the Pester module, this might get overwritten when Pester is updated.</li>
</ol>
<p>When we have more time we’ll put this up on Github so people can collaborate on changes. In the meantime, here&#8217;s a copy of the function.</p>
<pre class="lang:ps decode:true   ">#Requires -Version 3

&lt;#
.SYNOPSIS
    Retrieves a function's definition from a .ps1 file or ScriptBlock.
.DESCRIPTION
    Returns a function's source definition as a Powershell ScriptBlock from an
    external .ps1 file or existing ScriptBlock. This module is primarily
    intended to be used to test private/nested/internal functions with Pester
    by dot-sourcsing the internal function into Pester's scope.
.PARAMETER Function
    The source function's name to return as a [ScriptBlock].
.PARAMETER Path
    Path to a Powershell script file that contains the source function's
    definition.
.PARAMETER LiteralPath
    Literal path to a Powershell script file that contains the source
    function's definition.
.PARAMETER ScriptBlock
    A Powershell [ScriptBlock] that contains the function's definition.
.EXAMPLE
    If the following functions are defined in a file named 'PrivateFunction.ps1'

    function PublicFunction {
        param ()

        function PrivateFunction {
            param ()
            Write-Output 'InnerPrivate'
        }

        Write-Output (PrivateFunction)
    }

    The 'PrivateFunction' function can be tested with Pester by dot-sourcing
    the required function in the either the 'Describe', 'Context' or 'It'
    scopes.

    Describe "PrivateFunction" {
        It "tests private function" {
            ## Import the 'PrivateFunction' definition into the current scope.
            . (Get-FunctionDefinition -Path "$here\$sut" -Function PrivateFunction)
            PrivateFunction | Should BeExactly 'InnerPrivate'
        }
    }
.LINK
    https://virtualengine.co.uk/2015/testing-private-functions-with-pester/
#&gt;
function Get-FunctionDefinition {
    [CmdletBinding(DefaultParameterSetName='Path')]
    [OutputType([System.Management.Automation.ScriptBlock])]
    param (
        [Parameter(Position = 0,
          ValueFromPipeline = $true,
          ValueFromPipelineByPropertyName = $true,
          ParameterSetName='Path')]
        [ValidateNotNullOrEmpty()]
        [Alias('PSPath','FullName')]
        [System.String] $Path = (Get-Location -PSProvider FileSystem),
        
        [Parameter(Position = 0,
          ValueFromPipelineByPropertyName = $true,
          ParameterSetName = 'LiteralPath')]
        [ValidateNotNullOrEmpty()]
        [System.String] $LiteralPath,

        [Parameter(Position = 0,
          ValueFromPipeline = $true,
          ParameterSetName = 'ScriptBlock')]
        [ValidateNotNullOrEmpty()]
        [System.Management.Automation.ScriptBlock] $ScriptBlock,

        [Parameter(Mandatory = $true,
          Position =1,
          ValueFromPipelineByPropertyName = $true)]
        [Alias('Name')]
        [System.String] $Function        
    )

    begin {
        if ($PSCmdlet.ParameterSetName -eq 'Path') {
            $Path = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Path);
        }
        elseif ($PSCmdlet.ParameterSetName -eq 'LiteralPath') {
            ## Set $Path reference to the literal path(s)
            $Path = $LiteralPath;          
        }
    } # end begin

    process {
        $errors = @();
        $tokens = @();
        if ($PSCmdlet.ParameterSetName -eq 'ScriptBlock') {
            $ast = [System.Management.Automation.Language.Parser]::ParseInput($ScriptBlock.ToString(), [ref] $tokens, [ref] $errors);
        } 
        else {
            $ast = [System.Management.Automation.Language.Parser]::ParseFile($Path, [ref] $tokens, [ref] $errors);
        }

        [System.Boolean] $isFunctionFound = $false;
        $functions = $ast.FindAll({ $args[0] -is [System.Management.Automation.Language.FunctionDefinitionAst] }, $true);
        foreach ($f in $functions) {
            if ($f.Name -eq $Function) {
                Write-Output ([System.Management.Automation.ScriptBlock]::Create($f.Extent.Text));
                $isFunctionFound = $true;
            }
        } # end foreach function

        if (-not $isFunctionFound) {
            if ($PSCmdlet.ParameterSetName -eq 'ScriptBlock') {
                $errorMessage = 'Function "{0}" not defined in script block.' -f $Function;
            }
            else {
               $errorMessage = 'Function "{0}" not defined in "{1}".' -f $Function, $Path;
            }
            Write-Error -Message $errorMessage;
        }
    } # end process
} #end function Get-Function</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/testing-private-functions-with-pester/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>App-V 5 Sequencer Template &#8211; Full VFS Write Mode</title>
		<link>https://virtualengine.co.uk/app-v-5-sequencer-template-full-vfs-write-mode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app-v-5-sequencer-template-full-vfs-write-mode</link>
					<comments>https://virtualengine.co.uk/app-v-5-sequencer-template-full-vfs-write-mode/#comments</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Tue, 06 May 2014 10:34:24 +0000</pubDate>
				<category><![CDATA[App-V]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[.appv]]></category>
		<category><![CDATA[.appvt]]></category>
		<category><![CDATA[App-V 5]]></category>
		<category><![CDATA[AppV5]]></category>
		<category><![CDATA[full vfs write]]></category>
		<category><![CDATA[FullVFSWriteMode]]></category>
		<category><![CDATA[sequencer]]></category>
		<category><![CDATA[template]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3418</guid>

					<description><![CDATA[With the recent release of Hotfix 4 for App-V 5.0, Microsoft has now provided the ability to &#8220;Allow virtual applications full write permissions to the virtual file system&#8221;. This setting can be found in the sequencer under the &#8220;Advanced&#8221; tab as demonstrated in the screen shot below:   Should you wish to enable this setting &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/app-v-5-sequencer-template-full-vfs-write-mode/" class="more-link">Continue reading<span class="screen-reader-text"> "App-V 5 Sequencer Template &#8211; Full VFS Write Mode"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>With the recent release of <a title="Hotfix 4 download" href="http://support.microsoft.com/kb/2956985" target="_blank">Hotfix 4</a> for App-V 5.0, Microsoft has now provided the ability to &#8220;Allow virtual applications full write permissions to the virtual file system&#8221;. This setting can be found in the sequencer under the &#8220;Advanced&#8221; tab as demonstrated in the screen shot below:</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/Full-VFS-Write.png"> </a><a href="https://virtualengine.co.uk/wp-content/uploads/Sequncer-Full-VFS.png"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-3430 size-full" src="https://virtualengine.co.uk/wp-content/uploads/Sequncer-Full-VFS.png" alt="Sequncer Full VFS" width="547" height="202" /></a></p>
<p>Should you wish to enable this setting as a default whenever you create a new package, then simply go ahead and add <strong>&lt;FullVFSWriteMode&gt;true&lt;FullVFSWriteMode&gt;</strong> into your sequencer template (.appvt), as you can see below. This setting is only valid where you have the App-V 5.0 SP2 Hotfix 4 sequencer installed.</p>
<pre class="lang:xml decode:true">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;SequencerTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;AllowMU&gt;false&lt;/AllowMU&gt;
  &lt;AppendPackageVersionToFilename&gt;false&lt;/AppendPackageVersionToFilename&gt;
  &lt;AllowLocalInteractionToCom&gt;false&lt;/AllowLocalInteractionToCom&gt;
  &lt;AllowLocalInteractionToObject&gt;false&lt;/AllowLocalInteractionToObject&gt;
  &lt;FullVFSWriteMode&gt;true&lt;/FullVFSWriteMode&gt;
  &lt;ExcludePreExistingSxSAndVC&gt;false&lt;/ExcludePreExistingSxSAndVC&gt;
  &lt;FileExclusions&gt;
    &lt;string&gt;[{CryptoKeys}]&lt;/string&gt;
    &lt;string&gt;[{Common AppData}]\Microsoft\Crypto&lt;/string&gt;
    &lt;string&gt;[{Common AppData}]\Microsoft\Search\Data&lt;/string&gt;
    &lt;string&gt;[{Cookies}]&lt;/string&gt;
    &lt;string&gt;[{History}]&lt;/string&gt;
    &lt;string&gt;[{Cache}]&lt;/string&gt;
    &lt;string&gt;[{Local AppData}]&lt;/string&gt;
    &lt;string&gt;[{Personal}]&lt;/string&gt;
    &lt;string&gt;[{Profile}]\Local Settings&lt;/string&gt;
    &lt;string&gt;[{Profile}]\NTUSER.DAT.LOG1&lt;/string&gt;
    &lt;string&gt;[{Profile}]\NTUSER.DAT.LOG2&lt;/string&gt;
    &lt;string&gt;[{Recent}]&lt;/string&gt;
    &lt;string&gt;[{Windows}]\Debug&lt;/string&gt;
    &lt;string&gt;[{Windows}]\Logs\CBS&lt;/string&gt;
    &lt;string&gt;[{Windows}]\Temp&lt;/string&gt;
    &lt;string&gt;[{Windows}]\WinSxS\ManifestCache&lt;/string&gt;
    &lt;string&gt;[{Windows}]\WindowsUpdate.log&lt;/string&gt;
    &lt;string&gt;[{AppVPackageDrive}]\$Recycle.Bin&lt;/string&gt;
    &lt;string&gt;[{AppVPackageDrive}]\System Volume Information&lt;/string&gt;
    &lt;string&gt;[{AppData}]\Microsoft\AppV&lt;/string&gt;
    &lt;string&gt;[{Local AppData}]\Temp&lt;/string&gt;
    &lt;string&gt;[{ProgramFilesX64}]\Microsoft Application Virtualization\Sequencer&lt;/string&gt;
  &lt;/FileExclusions&gt;
  &lt;RegExclusions&gt;
    &lt;string&gt;REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\Cryptography&lt;/string&gt;
    &lt;string&gt;REGISTRY\MACHINE\SOFTWARE\Microsoft\Cryptography&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Streams&lt;/string&gt;
    &lt;string&gt;REGISTRY\MACHINE\SOFTWARE\Microsoft\AppV&lt;/string&gt;
    &lt;string&gt;REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\AppV&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\AppV&lt;/string&gt;
    &lt;string&gt;REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\AppV&lt;/string&gt;
  &lt;/RegExclusions&gt;
  &lt;TargetOSes /&gt;
&lt;/SequencerTemplate&gt;</pre>
<p>And if you&#8217;re not currently using a template then I&#8217;d highly recommend you do. You&#8217;ll find a great article over at Rory Monaghan&#8217;s <a title="App-V 5.0 Templates" href="http://rorymon.com/blog/index.php/app-v-5-0-templates/" target="_blank">blog</a> that explains the use of the sequencer template in more detail.</p>
<p>Nathan</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/app-v-5-sequencer-template-full-vfs-write-mode/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>Windows 8.1 Update KB 2919355 Error 0x8007003</title>
		<link>https://virtualengine.co.uk/windows-8-1-update-kb-2919355-error-0x8007003/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-8-1-update-kb-2919355-error-0x8007003</link>
					<comments>https://virtualengine.co.uk/windows-8-1-update-kb-2919355-error-0x8007003/#comments</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Wed, 09 Apr 2014 08:17:15 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[8007003]]></category>
		<category><![CDATA[fails]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[KB2894853]]></category>
		<category><![CDATA[KB2919355]]></category>
		<category><![CDATA[wont]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3346</guid>

					<description><![CDATA[It’s been long, too long since the last post. However, never fear as we have plenty of new updates in the pipeline (pun intended!). This post is a little off topic but one that might help one or two people with the latest Windows 8.1 Update 1. Whilst installing the latest Windows 8.1 Update 1 &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/windows-8-1-update-kb-2919355-error-0x8007003/" class="more-link">Continue reading<span class="screen-reader-text"> "Windows 8.1 Update KB 2919355 Error 0x8007003"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>It’s been long, too long since the last post. However, never fear as we have plenty of new updates in the pipeline (pun intended!). This post is a little off topic but one that might help one or two people with the latest Windows 8.1 Update 1.</p>
<p>Whilst installing the latest Windows 8.1 Update 1 (and also KB2894853) on a couple of machines I saw the following error:</p>
<blockquote><p>Installation Failure: Windows failed to install the following update with error 0x8007003: Update for Windows (KB2919355)</p></blockquote>
<p>A quick Google landed me <a href="http://www.infoworld.com/t/microsoft-windows/windows-81-update-kb-2919355-fails-error-0x80070003-239769" target="_blank">here</a> which mentions that you will receive this error if the profiles directory is redirected with a registry key. As we have small SSDs in the office machines, the profile directory is indeed redirected to a bigger, spinning disk. This article is a little confusing (hence the post) as it states:</p>
<blockquote><p>After putting a copy of UserProfiles on the C: drive, installation finished normally.</p></blockquote>
<p>To fix the installation error we need to <strong>ensure that the <em>Default</em> directory is present in the redirected folder location</strong>, not on the C: drive. A quick copy of C:\Users\Default to D:\Users\Default fixed the installation issues with both updates.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/windows-8-1-update-kb-2919355-error-0x8007003/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>VET v1.4 Released!</title>
		<link>https://virtualengine.co.uk/vet-v1-4-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vet-v1-4-released</link>
					<comments>https://virtualengine.co.uk/vet-v1-4-released/#respond</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Thu, 01 Aug 2013 17:03:40 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Latest News]]></category>
		<category><![CDATA[VET]]></category>
		<category><![CDATA[Virtual Engine Toolkit]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3177</guid>

					<description><![CDATA[Virtual Engine are pleased to announce the general availability of version 1.4 of the Virtual Engine Toolkit (VET). The latest Windows installer and documentation is available for download now on the Virtual Engine web site. There&#8217;s no &#8220;What&#8217;s New&#8221; video this time but to view existing videos on the Virtual Engine Toolkit, please check out &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/vet-v1-4-released/" class="more-link">Continue reading<span class="screen-reader-text"> "VET v1.4 Released!"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Virtual Engine are pleased to announce the general availability of version 1.4 of the <a href="https://virtualengine.co.uk/vet" target="_blank">Virtual Engine Toolkit</a> (VET). The latest Windows installer and documentation is available for <a href="https://virtualengine.co.uk/vet">download now</a> on the Virtual Engine web site.</p>
<p>There&#8217;s no &#8220;What&#8217;s New&#8221; video this time but to view existing videos on the Virtual Engine Toolkit, please check out our <a href="http://www.youtube.com/virtualenginetoolkit">YouTube channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/vet-v1-4-released/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>App-V 5 Configuration Editor (ACE) v1.1 Released!</title>
		<link>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-1-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app-v-5-configuration-editor-ace-v1-1-released</link>
					<comments>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-1-released/#respond</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Tue, 23 Jul 2013 08:34:37 +0000</pubDate>
				<category><![CDATA[ACE]]></category>
		<category><![CDATA[App-V]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Latest News]]></category>
		<category><![CDATA[App-V 5]]></category>
		<category><![CDATA[AppV 5]]></category>
		<category><![CDATA[AppV5]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[deploymentconfig.xml]]></category>
		<category><![CDATA[Dynamic Configuration]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[userconfig.xml]]></category>
		<category><![CDATA[XML]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3142</guid>

					<description><![CDATA[Virtual Engine are pleased to announce the version 1.1 release of the App-V 5 Configuration Editor (ACE). This (free) utility provides a simple user interface for editing App-V 5 the machine or user dynamic configuration files without manually hacking the underlying XML files. New in this release is the ability to Add, Delete and Edit shortcuts within the &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-1-released/" class="more-link">Continue reading<span class="screen-reader-text"> "App-V 5 Configuration Editor (ACE) v1.1 Released!"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Virtual Engine are pleased to announce the version 1.1 release of the <a href="https://virtualengine.co.uk/vet/ace/">App-V 5 Configuration Editor (ACE)</a>. This (free) utility provides a simple user interface for editing App-V 5 the machine or user dynamic configuration files without manually hacking the underlying XML files. New in this release is the ability to <strong>Add</strong>, <strong>Delete</strong> and <strong>Edit</strong> shortcuts within the package, as well as various GUI improvements.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/app-v-5-configuration-editor-ace-v1-1-released/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>App-V 5 Configuration Editor User Guide</title>
		<link>https://virtualengine.co.uk/app-v-5-configuration-editor-user-guide-v1_1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app-v-5-configuration-editor-user-guide-v1_1</link>
					<comments>https://virtualengine.co.uk/app-v-5-configuration-editor-user-guide-v1_1/#respond</comments>
		
		<dc:creator><![CDATA[siteadmin]]></dc:creator>
		<pubDate>Tue, 23 Jul 2013 08:31:22 +0000</pubDate>
				<category><![CDATA[ACE]]></category>
		<category><![CDATA[App-V]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[.appv]]></category>
		<category><![CDATA[App-V 5]]></category>
		<category><![CDATA[AppV 5]]></category>
		<category><![CDATA[AppV5]]></category>
		<category><![CDATA[deploymentconfig.xml]]></category>
		<category><![CDATA[Dynamic Configuration]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[userconfig.xml]]></category>
		<category><![CDATA[XML]]></category>
		<guid isPermaLink="false">https://virtualengine.co.uk/?p=3109</guid>

					<description><![CDATA[We&#8217;ve been working hard getting the App-V 5 Configuration Editor (ACE) ready for official release; take a look at the ACE page for a bit more information about why it was developed. The purpose of this short blog to guide you through the ACE interface. There is an assumption here you have an understanding of &#8230; <p class="link-more"><a href="https://virtualengine.co.uk/app-v-5-configuration-editor-user-guide-v1_1/" class="more-link">Continue reading<span class="screen-reader-text"> "App-V 5 Configuration Editor User Guide"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://virtualengine.co.uk/wp-content/uploads/ACE-256px1.png"><img decoding="async" style="background-image: none; padding-top: 0px; padding-left: 10px; display: inline; padding-right: 0px; border-width: 0px;" title="ACE-256px" alt="ACE" src="https://virtualengine.co.uk/wp-content/uploads/ACE-256px_thumb.png" width="151" height="151" align="right" border="0" /></a>We&#8217;ve been working hard getting the App-V 5 Configuration Editor (ACE) ready for official release; take a look at the <a href="/vet/ace/">ACE</a> page for a bit more information about why it was developed.</p>
<p>The purpose of this short blog to guide you through the ACE interface. There is an assumption here you have an understanding of the <a href="http://technet.microsoft.com/en-us/library/jj713466.aspx" target="_blank">App-V 5 Dynamic Configuration</a> files and how they are used, if not you might want to take a look at this <a href="http://technet.microsoft.com/en-us/library/jj713466.aspx" target="_blank">Technet article</a>.</p>
<h3><strong>USER INTERFACE</strong></h3>
<h4><strong>Main Toolbar:</strong></h4>
<p>You will notice there are three main buttons in the tool bar as shown below:</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image162.png"><img loading="lazy" decoding="async" style="display: inline;" title="Main Toolbar" alt="Main Toolbar" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb159.png" width="540" height="371" /></a></p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image152.png"><img loading="lazy" decoding="async" style="display: inline; border-width: 0px;" title="image" alt="image" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb150.png" width="20" height="17" border="0" /></a> Opens an App-V XML file, i.e. a <em>UserConfig.xml</em> or <em>DeploymentConfig.xml </em>file. Once the file has been opened the contents will be parsed and displayed under the various tabs within the GUI.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image153.png"><img loading="lazy" decoding="async" style="display: inline; border-width: 0px;" title="image" alt="image" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb151.png" width="20" height="19" border="0" /></a> Saves the current App-V XML file, including any changes that have been made. You can give it a new name and Save As a different file, keeping your original one as is if necessary.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image154.png"><img loading="lazy" decoding="async" style="display: inline; border-width: 0px;" title="image" alt="image" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb152.png" width="20" height="20" border="0" /></a> Previews the changes that will be made to the App-V XML file before saving. This gives you the ability to check out the structure of the generated XML. It&#8217;s probably a good idea to point out here that you don&#8217;t need to preview the changes prior to performing a save.</p>
<h4><strong>Package Details:</strong></h4>
<p>This sections displays the <strong>Package Display Name</strong>, <strong>Package ID</strong> and <strong>Type</strong> of XML file opened, i.e. <em>DeploymentConfig</em> or <em>UserConfig</em>. Here is an example <em>DeploymentConfig.xml</em> opened below:</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image163.png"><img loading="lazy" decoding="async" style="display: inline;" title="Package Details" alt="Package Details" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb160.png" width="547" height="376" /></a></p>
<h3><strong style="font-size: 1.17em;">MAIN CONFIGURATION TABS</strong></h3>
<p>Once an App-V 5 configuration XML file has been opened you can then begin to make changes as required using the tabs set out below.</p>
<h4><strong>User Configuration</strong></h4>
<p>Under the User Configuration tab you can change and view various options and configurations:</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image164.png"><img loading="lazy" decoding="async" style="display: inline;" title="User Configuration" alt="User Configuration" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb161.png" width="541" height="372" /></a></p>
<h5><strong>Options</strong></h5>
<p>Various global options change be changed here if you so desire, e.g. altering the COM integration mode.</p>
<h5><strong>Shortcuts</strong></h5>
<p>This tab allows you to <strong>View</strong>, <strong>Add</strong>, <strong>Edit</strong> or <strong>Delete</strong> any Shortcuts within the package.</p>
<p>If you want to delete an existing shortcut, simply select the row that contains the shortcut and press delete. Should you wish to add a new shortcut, I&#8217;d suggest you copy and paste an existing row and then edit the fields accordingly; we&#8217;ve added a context menu to make that task easy, should you not fancy using Ctrl+C and Ctrl+V  <img decoding="async" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://virtualengine.co.uk/wp-content/uploads/wlEmoticon-smile10.png" />.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image165.png"><img loading="lazy" decoding="async" style="display: inline;" title="Shortcuts" alt="Shortcuts" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb162.png" width="537" height="369" /></a></p>
<h5><strong>Scripts (User Context</strong>)</h5>
<p>This is really where ACE starts to make life simple <img decoding="async" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://virtualengine.co.uk/wp-content/uploads/wlEmoticon-smile10.png" />. You can easily define which scripts you’d like to add and to which script actions, e.g. <strong>PublishPackage</strong>, <strong>UnpublishPackage</strong>, <strong>StartVirtualEnvironment</strong>, <strong>TerminateVirtualEnvironment</strong>, <strong>StartProcess</strong> and <strong>ExitProcess. </strong>There is no need to worry about getting the syntax in the XML file right. There are some excellent blogs out there talking about using scripts in App-V 5.0, so I suggest you take a look here at one from <a href="http://www.tmurgent.com/TmBlog/?p=1154" target="_blank">Tim Mangan</a> and Microsoft’s own <a href="http://blogs.technet.com/b/gladiatormsft/archive/2013/05/02/app-v-5-scripting-change.aspx" target="_blank">Steve Thompson</a> if you need some further background information.</p>
<p><strong>NOTE</strong>: You might have noticed that not all the script actions are available under this tab, that’s simply because those excluded aren&#8217;t permitted to run under the User Configuration section of the XML file.</p>
<p>I think most of the options are self explanatory but, it&#8217;s good to point out that leaving the <strong>Timeout</strong> value at 0 means no timeout period will be set, i.e. it will wait indefinitely for it to finish so use with caution.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image166.png"><img loading="lazy" decoding="async" style="display: inline;" title="Scripts (User Context)" alt="Scripts (User Context)" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb163.png" width="540" height="371" /></a></p>
<h4><strong>Machine Configuration</strong></h4>
<p>Under the Machine Configuration tab you can alter global options, configure scripts and control the termination of processes.</p>
<p><strong>NOTE:</strong> this tab will only be available when you open a <em>DeploymentConfig.xml </em>file. This is because machine configuration items cannot be set in the <em>UserConfig.xml</em> file.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image167.png"><img loading="lazy" decoding="async" style="display: inline;" title="Machine Configuration" alt="Machine Configuration" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb164.png" width="538" height="370" /></a></p>
<h5><strong>Options</strong></h5>
<p>Here you’ll find any options that can be changed if you so desire.</p>
<h5><strong>Terminate Child Processes</strong></h5>
<p>You can define the path to an executable, that when closed, will terminate any child process running within the virtual environment.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image168.png"><img loading="lazy" decoding="async" style="display: inline;" title="Terminate Child Processes" alt="Terminate Child Processes" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb165.png" width="538" height="370" /></a></p>
<h5><strong>Scripts (System Context)</strong></h5>
<p>Very much like the Scripts tab under User Configuration you can define which scripts you’d like to add to which machine script actions, e.g. <strong>AddPackage</strong>, <strong>RemovePackage</strong>, <strong>PublishPackage</strong> and <strong>UnpublishPackage.</strong></p>
<p><strong>NOTE</strong>: You might have noticed that not all the script actions are available under this tab, that’s simply because those excluded aren&#8217;t permitted to run under the Machine Configuration section of the XML file.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image169.png"><img loading="lazy" decoding="async" style="display: inline;" title="Scripts (System Context)" alt="Scripts (System Context)" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb166.png" width="538" height="370" /></a></p>
<h4><strong style="font-size: 1em;">XML</strong></h4>
<p>You can view both the source (original) XML and/or preview the generated XML under this tab.</p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image170.png"><img loading="lazy" decoding="async" style="display: inline;" title="Source XML" alt="Source XML" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb167.png" width="540" height="371" /></a></p>
<h5><strong>Source XML</strong></h5>
<p>This is simply where you can view your source App-V XML file as it was when you opened it.</p>
<h5><strong>Generated XML</strong></h5>
<p>Once you click the Preview button <a href="https://virtualengine.co.uk/wp-content/uploads/image154.png"><img loading="lazy" decoding="async" style="display: inline; border-width: 0px;" title="image" alt="image" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb152.png" width="20" height="20" border="0" /></a> this pane will display any changes that will be made to the App-V XML file, giving you the ability to check out the structure of the XML before saving if you wish. <strong>NOTE</strong>: <strong>You don&#8217;t have to preview the changes prior to performing a save.</strong></p>
<p>The example below (highlighted in yellow) shows the changes made by ACE in the generated XML format. <strong>NOTE: ACE will not highlight the changes in the XML, we&#8217;ve done it here for clarity purposes only.</strong></p>
<p><a href="https://virtualengine.co.uk/wp-content/uploads/image171.png"><img loading="lazy" decoding="async" style="display: inline;" title="Generated XML" alt="Generated XML" src="https://virtualengine.co.uk/wp-content/uploads/image_thumb168.png" width="540" height="441" /></a></p>
<p>With any luck this brief guide has given you a good overview of how to use ACE and hopefully you&#8217;ll agree its pretty intuitive to use and should make editing the App-V 5 Dynamic Configuration files a lot, lot easier (well we think so anyway!)? <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><span style="color: #ff0000;"><strong>DISCLAIMER: THE APP-V CONFIGURATION EDITOR IS FREE TO USE AT YOUR OWN RISK, WE CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE IT MIGHT CAUSE.</strong></span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtualengine.co.uk/app-v-5-configuration-editor-user-guide-v1_1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
