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.
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.
Actual documentation and sample code:
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.