# Installing AppFabric with DSC

**URL:** <https://forums.powershell.org/t/installing-appfabric-with-dsc/3331>\
**Category:** DSC\
**Created:** [October 28, 2014, 8:41am UTC](https://forums.powershell.org/t/installing-appfabric-with-dsc/3331 "2014-10-28T08:41:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael-felkins](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@michael-felkins](https://forums.powershell.org/u/michael-felkins)\
**Post date:** [October 28, 2014, 8:41am UTC](https://forums.powershell.org/t/installing-appfabric-with-dsc/3331/1 "2014-10-28T08:41:59Z")

</div>

Hi,

I have tried several was to use DSC to install AppFabric. A couple of them work.  
xPackage installs the app but then it cant test for it, as there is no GUID to identify it.

My next try was WindowsProcess

```
WindowsProcess AF #ResourceName

```

{  
Arguments = “/i CachingService,CacheClient,CacheAdmin /SkipUpdates /logfile F:\Logs\AppFabric\AppFabricInstallLog.txt”  
Path = “D:\Install\AppFabric\WindowsServerAppFabricSetup\_x64\_6.1.exe”  
#Credential = $cred  
Ensure = “Present”

# [DependsOn = [string] ]

# [StandardErrorPath = [string] ]

# [StandardInputPath = [string] ]

# [StandardOutputPath = [string] ]

```
	WorkingDirectory = "D:\Install\AppFabric"

```

}

This works as well, But it does not wait for the process to complete before it moves on so I get an error.  
In my old Powershell script I did this:

Wait-Process “WindowsServerAppFabricSetup\_x64\_6.1”

Is there a way to do this in DSC?

Old Dog

---

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://forums.powershell.org/u/craig)\
**Post date:** [October 30, 2014, 7:09am UTC](https://forums.powershell.org/t/installing-appfabric-with-dsc/3331/2 "2014-10-30T07:09:35Z")

</div>

Funny, I’m working on the exact same thing today. Here’s what I’ve got (below). Unfortunately it doesn’t always work, digging through the MSI log file trying to figure out the 1603 error when it fails to install.

```
configuration AppFabricTest
{
    node (hostname)
    {
        Script AppFabric
        {
            GetScript = { Return "AppFabric" }
            TestScript = {
                $appFabric = Get-WmiObject -Class win32_product -Filter "Name='AppFabric 1.1 for Windows Server'" 
                
                if ($appFabric) {
                    Write-Verbose "AppFabric 1.1 for Windows Server is installed"
                    return $true
                } 
                else 
                {
                    Write-Verbose "AppFabric 1.1 for Windows Server is not installed"
                    return $false
                } 
            }
            SetScript = { 
                Start-Process -FilePath 'C:\Temp\SharepointPreReqs\WindowsServerAppFabricSetup_x64.exe' -Wait -ArgumentList @(
                    '/i cacheclient,cachingService,cacheadmin'
                    '/gac'
                    '/l c:\temp\appfabric.log'
                )
            }  
        }
    }
}

AppFabricTest -OutputPath c:\temp\AppFabricTest

Start-DscConfiguration -Verbose -Wait -Path c:\temp\AppFabricTest
```

---

<div class="post-metadata">

**Author:** ![michael-felkins](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@michael-felkins](https://forums.powershell.org/u/michael-felkins)\
**Post date:** [November 6, 2014, 8:38am UTC](https://forums.powershell.org/t/installing-appfabric-with-dsc/3331/3 "2014-11-06T08:38:54Z")

</div>

Hi,

Any luck on your quest?

I notice that when I run: $appFabric = Get-WmiObject -Class win32\_product  
I do not get Appfabric even though it’s installed.  
Perhaps we are using a different version.

In any event, mine installs, it just does not wait till it’s finished.  
One thing I did note; My install requires that the Windows Update service is running.

Start-Service wuauserv  
Sleep -s 5

I’ll try your version and see if it waits.

OldDog

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/installing-appfabric-with-dsc/3331/4 "2024-05-16T21:17:26Z")

</div>


