Git Product home page Git Product logo

resourcecontrollerdsc's Introduction

ResourceControllerDSC

master: Build status

dev: Build status

The ResourceControllerDSC module allows you to control other DSC resources by adding a Maintenance Window so Set-TargetResource will only run during that window. Also allows you to supress a reboot when a resource does not have the option.

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.

Contributing

Please check out common DSC Resources contributing guidelines.

Resources

  • ResourceController: Provides the ability to add a maintenance window and supress reboots. Maintenance windows and Supress reboots only effect Set-TargetResource. Get and Test will always run for reporting.

ResourceController

  • [String] InstanceName (Key): A unique name to give the resource.

  • [String] ResourceName: The name of the resource you want to run.

  • [Scriptblock] Properties: A Scriptblock that returns a Hashtable of the properties for the resource you are calling.

  • [Credential] Credentials: Credentials you want to use as properties in the Properties Scriptblock.

    • [String] Name: The name of the credential. Used to reference the credential in the properties.
    • [PSCredential] Credential: The Credential object.
  • [MaintenanceWindow] MaintenanceWindow: Object representing a maintenance window DaysofWeek Week Days

    • [string] Frequency: The frequency the schedule should run. { Daily | Weekly | Monthly }
    • [DateTime] StartTime: The start time the resource is aloud to run Set-TargetResource when the day is inside the maintenance window
    • [DateTime ] EndTime: The end time the resource is aloud to run Set-TargetResource when the day is inside the maintenance window
    • [DateTime] StartDate: The date the resource is aloud to run Set-TargetResource.
    • [DateTime] EndDate: The date the resource will no longer run Set-TargetResource.
    • [String[]] DaysofWeek: The days of week Set-TargetResource will run. { Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday }
    • [int[] Week: The week in the month you want Set-TargetResource to run. {0} represents the last week of the month. { 0 | 1 | 2 | 3 | 4 }
    • [int[]] Days: The day in the month you want Set-TargetResource to run. {0} represents the last day of the month. { 0-31 }
  • [bool] SupressReboot: Whether you should supress a forced reboot. { True | False }

ResourceController Examples

Versions

2.0.1

  • Removed parameter validation to avoid potential issues with ValidateScript

2.0.0

  • Added Credential object to use in the properties.
  • Converted Properties from a Hashtable to a Scriptblock so it can handle more object types like arrays. If you want to use a PsCredential then you set the value to [PsCredential]:< Name>. This will replace that string with the credential object matching the name of the credential passed in the Credential parameter.

1.3.1

Converted resource parameters to there desired type.

1.3

Breaking Change: Fixed variable names in DSCResource

1.2

Breaking Change: Add ResourceVersion to support systems with multiple versions installed.

1.1

  • Fixed bug: Test-MaintenanceWindow would fail if one Maintenance Window of an array of windows was outside the window.

1.0.0.0

  • Initial release with the following resources:

    • ResourceController

resourcecontrollerdsc's People

Contributors

mcollera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

39delta

resourcecontrollerdsc's Issues

Using ResourceControllerDsc with Invoke-DscResource cmdlet can take up to a minute to import resources

Using ResourceControllerDsc with Invoke-DscResource cmdlet can take up to a minute to import resources. When executing the Invoke-DscResource multiple times for different configurations it can take around a minute per config to complete execution. It appears that filtering resources based on name and version can take a long time to collect resource info from the environment.

By including the module name when retrieving resources, the query time can be significantly reduced.

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.