-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Mismatch between documentation and sample code #8304
Copy link
Copy link
Closed
Labels
area-dscArea - Desired State ConfigurationArea - Desired State Configuration
Description
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.
- ID: 74484a4a-4ab1-1b3c-7487-2c5b221858f4
- Version Independent ID: ee383de5-1b13-a7a1-d2e7-2ebbfddde42a
- Content: Add Parameters to a Configuration - PowerShell
- Content Source: reference/docs-conceptual/dsc/configurations/add-parameters-to-a-configuration.md
- Product: powershell
- Technology: powershell-conceptual
- GitHub Login: @mgreenegit
- Microsoft Alias: migreene
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-dscArea - Desired State ConfigurationArea - Desired State Configuration