Coder Social home page Coder Social logo

compositeresource's Introduction

Composite Resource Module

Build status

The purpose of this project is to provide a tool for converting PowerShell Desired State Configuration configurations to composite resources.

Installation:

Install-Module -Name compositeresource

Usage:

The tool does not convert a script file, it converts a configuration. This way writing out to a temporary file is never required.

From configuration file

If you are using MyConfiguration.ps1:

Configuration sampleConfig
{

}

you must first load the confguration into memory by executing MyConfiguration.ps1.

ConvertTo-CompositeResource -ConfigurationName 'sampleConfig' -Author 'Name' -Description 'Text'

From script

You can also compose the entire configuration inline and pass it in with the -script parameter.

$configurationScript = @"
Configuration Example3
{
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    node localhost
    {
        WindowsFeature 'NetFramework45'
        {
            Name   = 'NET-Framework-45-Core'
            Ensure = 'Present'
        }
    }
}
"@

ConvertTo-CompositeResource -Script $configurationScript -Author 'Name' -Description 'Text'

Output:

<no command output returned when successful>

By default the tool will write a new folder based on the configuration name + 'DSC', e.g. 'TestDSC'. The folder contains a version folder which then contains a module and manifest. The module should be immediately functional once it is copied into a path present in $env:PSModulePath.

To test if the resource is available, run the command:

Get-DscResource

Release Notes

09/07/2018 - Michael Greene and Johan Ljunggren collaborated on a minimum viable product for the solution and published the result as an open source project on GitHub.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

compositeresource's People

Contributors

johlju avatar mgreenegit avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar zjalexander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compositeresource's Issues

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.