Skip to content

Mismatch between documentation and sample code #8304

@MCTSQL

Description

@MCTSQL

Expected documentation and sample code:

We now have a parameterized Configuration that forces the user to specify a -ComputerName, -ServiceName, and validates the -State parameter.

Configuration TestConfig
{
    param
    (
        [parameter(Mandatory)]
        [String]
        $ServiceName,

        [ValidateSet("Running","Stopped")]
        [String]
        $State="Running",

        [parameter(Mandatory)]
        [String]
        $ComputerName="localhost"
    )

Actual documentation and sample code:

We now have a parameterized Configuration that forces the user to specify an -InstanceName, -ServiceName, and validates the -State parameter.

Configuration TestConfig
{
    param
    (
        [parameter(Mandatory)]
        [String]
        $ServiceName,

        [ValidateSet("Running","Stopped")]
        [String]
        $State="Running",

        [String]
        $ComputerName="localhost"
    )


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dscArea - Desired State Configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions