configuration MyDSCPullServer 
{ 
    param 
    ( 
        [string[]]$NodeName = 'localhost', 
 
        [parameter(mandatory=$true)] 
        [string] $certificateThumbPrint, 
 
        [parameter(mandatory=$true)] 
        [string] $RegistrationKey   
    ) 
 
    Import-DSCResource -ModuleName xPSDesiredStateConfiguration, PSDesiredStateConfiguration 
 
    Node $NodeName 
    { 
        WindowsFeature DSCServiceFeature 
        { 
            Ensure = "Present" 
            Name   = "DSC-Service" 
 
        } 
 
        xDscWebService MyPullServer 
        { 
            Ensure                  = "Present" 
            EndpointName            = "MyPullServer" 
            Port                    = 8080 
            PhysicalPath            = "$env:SystemDrive\inetpub\wwwroot\MyPullServer" 
            CertificateThumbPrint   = $certificateThumbPrint 
            ModulePath              = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" 
            ConfigurationPath       = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration" 
            State                   = "Started" 
            RegistrationKeyPath     = "$env:PROGRAMFILES\WindowsPowerShell\DscService" 
            UseSecurityBestPractices = $false 
            DependsOn               = "[WindowsFeature]DSCServiceFeature" 
        } 
 
        File RegistrationKeyFile 
        { 
            Ensure          = 'Present' 
            Type            = 'File' 
            DestinationPath = "$env:ProgramFiles\WindowsPowerShell\DscService\RegistrationKeys.txt" 
            Contents        = $RegistrationKey 
        } 
    } 
}
