Installing AppFabric with DSC

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

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

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