I work through a DSC book from powershell.org and try to configure a push server using the configuration code specified in the book.
configuration CreatePullServer { param ( [string[]]$ComputerName = 'localhost' ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node $ComputerName { WindowsFeature DSCServiceFeature { Ensure = "Present" Name = "DSC-Service" } xDscWebService PSDSCPullServer { Ensure = "Present" EndpointName = "PSDSCPullServer" Port = 8080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer" CertificateThumbPrint = "AllowUnencryptedTraffic" ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration" State = "Started" DependsOn = "[WindowsFeature]DSCServiceFeature" } xDscWebService PSDSCComplianceServer { Ensure = "Present" EndpointName = "PSDSCComplianceServer" Port = 9080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer" CertificateThumbPrint = "AllowUnencryptedTraffic" State = "Started" IsComplianceServer = $true DependsOn = ("[WindowsFeature]DSCServiceFeature","[xDSCWebService]PSDSCPullServer") } } } CreatePullServer -ComputerName pull1.lab.pri
When I run the script configuration, powershell reports that it cannot load the xPSDesiredStateConfiguration module.
Import-DSCResource -ModuleName xPSDesiredStateConfiguration Unable to load module 'xPSDesiredStateConfiguration': module not found.
I confirmed that I have a DSC resource set installed and the module is specified when I execute the Get-DSCResource command. Can someone let me know what I may have done wrong?
In addition, I am using the 64-bit version of Windows 7 and installed KB2819745 to port powershell to version 4.
source share