GithubHelp home page GithubHelp logo

Comments (1)

michaeltlombardi avatar michaeltlombardi commented on June 18, 2024

Hi, @ethanhou99! Thanks for submitting this issue. I think the root of your problem here is that you're trying to use the configuration keyword in PowerShell 7.2 / with DSC v3. v3 is still in preview at this time.

The documentation you were reading is for DSC v1.1. The getting started documentation for v3 is here and does not mention the configuration keyword because it is not supported in v3.

Another significant change in DSC v3 is that only class-based DSC Resources are supported. While v3 is in preview, many resources have not yet been converted to be class-based. Unfortunately, this includes the Environment resource.

If you'd like to use the documentation you were reading, you'd need to use Windows PowerShell 5.1 and DSC v1.1, which ships with that version of PowerShell. To ensure it loads properly, you'll need to either uninstall the newer version of the PSDesiredStateConfiguration module or ensure you import it with the MaximumVersion parameter set to 1.1:

Import-Module PSDesiredStateConfiguration -MaximumVersion 1.1

I'm going to close this issue for now, but if you have more questions or comments, please do let me know!

from powershell-docs-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.