Giter Site home page Giter Site logo

psdscexecutor's Introduction

PowerShell Gallery Version Gallery Downloads GitHub Release GitHub CI Build

PSDscExecutor PowerShell Module

Create and execute PowerShell DSC configurations without managing the LCM.

Introduction

The PSDscExecutor uses the Invoke-DscResource cmdlet to invoke a DSC configuration without the need of manual compiling and invoking via a DSC LCM. This is especially useful, if DSC is used embedded in other controller scripts or to configure cloud services like Microsoft 365.

Why PSDscExecutor?

But why should you use the PSDscExecutor over the built-in Invoke-DscResource cmdlet?

  • Use PowerShell DSC configurations instead of single resources, including all benefits like auto-completion
  • Detect and install all PowerShell modules dependencies on the target systems
  • Use a local ad-hoc encryption certificate to protect secrets in the DSC configurations
  • On the fly compiling to MOF and interpreting the compiled MOF
  • Handle reboot with multiple options: always reboot, never reboot and continue, never reboot and quit or as the user.
  • Option to execute only the get method for all resources to get the current state (as objects) by using Get-DesiredState
  • Option to execute only the test method for all resources to check the desired state without applying it by using Test-DesiredState
  • Option to execute only the set method for all resources to invoke the desired state but not checking it by using Set-DesiredState (maybe not so useful)
  • Invoke the DSC configurations by using Invoke-DesiredState to bring it to the desired state by executing the test and set methods, if required in a loop, until the resource is in desired state

Are there some limitations in PSDscExecutor?

Yes, the module is designed to execute the commands locally or on a single remote system.

  • Multiple remote systems (nodes in the DSC configuration) are not supported
  • It's required to use Windows PowerShell 5.1 because of a bug in the DSC configuration compilation in PowerShell 6/7
  • Administrator permissions are required if invoked against the local system because in the background the Invoke-DscResource cmdlet is used which interacts with the LCM and the system wide module store

Features

  • Get-DesiredState
    Get the current state of all resources in a configuration.

  • Test-DesiredState
    Test if all resources in a configuration are in the desired state.

  • Set-DesiredState
    Apply the desired state configuration to the targets once.

  • Invoke-DesiredState
    Perform get, set and test methods to bring the target system into the desired state. It will continue to test and set until the target system is in desired state.

Versions

Please find all versions in the [GitHub Releases] section and the release notes in the CHANGELOG.md file.

Installation

Use the following command to install the module from the PowerShell Gallery, if the PackageManagement and PowerShellGet modules are available:

# Download and install the module
Install-Module -Name 'PSDscExecutor'

Alternatively, download the latest release from GitHub and install the module manually on your local system:

  1. Download the latest release from GitHub as a ZIP file: [GitHub Releases]
  2. Extract the module and install it: [Installing a PowerShell Module]

Requirements

The following minimum requirements are necessary to use this module, or in other words are used to test this module:

  • Windows PowerShell 5.1

Contribute

Please feel free to contribute to this project. For the best development experience, please us the following tools:

psdscexecutor's People

Contributors

claudiospizzi avatar

Watchers

 avatar

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.