Code Monkey home page Code Monkey logo

Comments (4)

dlwyatt avatar dlwyatt commented on August 12, 2024

Try this:

BindingInfo = PSHOrg_cWebBindingInformation
{
    Protocol = "HTTP"
    Port = 80
    HostName = "*"
}

from dsc.

jpolman avatar jpolman commented on August 12, 2024

don't now where to put that information.
i now have:

[CimInstance[]]$webbie = @(New-CimInstance -ClassName PSHOrg_cWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{`
Port = [System.UInt16]81;
Protocol = "http";
IPAddress = "*";
HostName = "";
} -ClientOnly)

cWebsite website{
Name = "Services"
Ensure = "Present"
PhysicalPath = "c:\inetpub\wwwroot"
State = "Started"
ApplicationPool = "Services"
BindingInfo = $webbie
}

that gives me the CimInstance array, which the cWebsite needs, but gives me an error.

from dsc.

dlwyatt avatar dlwyatt commented on August 12, 2024

It should look like this:

cWebsite website {
    Name = "Services"
    Ensure = "Present"
    PhysicalPath = "c:\inetpub\wwwroot"
    State = "Started"
    ApplicationPool = "Services"
    BindingInfo = PSHOrg_cWebBindingInformation
                  {
                      Port = 81
                      Protocol = "http"
                      IPAddress = "*"
                      HostName = ""
                  }
}

I'm not sure if there's a way to assign an embedded instance to a variable in your configuration, the way you were attempting to. That looks like a reasonable thing to support, though, and maybe it's worth filing this as a bug on the Connect site for Microsoft to look into.

from dsc.

jpolman avatar jpolman commented on August 12, 2024

thanks Dave, that works!

from dsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.