1

At the moment we are trying to setup an application pool using PowerShell DSC (WMF5.0) and the xWebAdminstration (v1.15) module. We have, so far, managed to get the client node and pull server to work together successfully using the instruction from https://msdn.microsoft.com/en-us/powershell/dsc/pullserver. Using the script below the client node installs IIS successfully but the application pool is not being created and this is where the issue lies.

Configuration MyWebsite
{
    Import-DscResource -ModuleName xWebAdministration

    Node Webserver
    {
        WindowsFeature IIS
        {
            Ensure="Present"
            Name="Web-Server"
        }
        WindowsFeature Mgmt-Tools 
        {
            Ensure  = "Present"
            Name    = "Web-Mgmt-Tools" 
        }
        WindowsFeature Mgmt-Console 
        {
            Ensure  = "Present"
            Name    = "Web-Mgmt-Console" 
        }
        WindowsFeature Mgmt-Service 
        {
            Ensure  = "Present"
            Name    = "Web-Mgmt-Service" 
        }

        $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
        $cred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)

        xWebAppPool ApplicationPool
        {
            Name = "my-application-pool"
            AutoStart = $true
            ManagedPipelineMode = "Integrated"
            ManagedRuntimeVersion = "v4.0"
            IdentityType = "SpecificUser"
            Credential = $cred
            Enable32BitAppOnWin64 = $false

        }
    }
}

$ConfigurationData = @{
    AllNodes = @(
        @{
            NodeName = "Webserver"
            PSDscAllowPlainTextPassword = $true
            PSDscAllowDomainUser = $true
        }
    )
}

MyWebsite -ConfigurationData $ConfigurationData

The creation of the application pool depends on a module called xWebAdministration. We expect that this module will be downloaded by the client node during the execution of the MOF file – is this correct? Further, the .zip file for this module is made available on the pull server in the modules directory with its checksum file.

enter image description here

The event log of the pull server doesn’t show any errors. The client node event log is also devoid of error entries. The client successfully sends reports to the pull server.

Do you perhaps have any suggestions as to what we may be missing?

sduplooy
  • 111
  • 4
  • Did you look in event viewer on the client under `Applications and Services Logs > Microsoft > Windows > Desired State Configuration > Operational`? Also when you zip a module it can't have the version folder in the module zip. That will get created when DSC unzips on the client. If the module is already on the client it will error instead of replacing it. – JBaldridge Nov 16 '16 at 20:44

1 Answers1

0

You will require some mechanism to push DSC module as well, May be below article will help you.

vcloud-lab.com/entries/desired-state-configuration/powershell-finding-powershell-dsc-module-and-downloading-it-2

  • He's trying to use the built-in module download, rather than a downloader to pull from another source. Please make sure to format your links as clickable. and to include the relevant content from a link to form a self-contained answer. When quoting from another site, please make sure to attribute it appropriately. Welcome to ServerFault. – Matthew Wetmore Jul 20 '17 at 06:16