mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
51 lines
1.1 KiB
PowerShell
51 lines
1.1 KiB
PowerShell
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[System.String]
|
|
$ConfigurationName
|
|
)
|
|
|
|
Configuration $ConfigurationName
|
|
{
|
|
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateNotNullOrEmpty()]
|
|
[System.String[]]
|
|
$Name,
|
|
|
|
[ValidateSet('Present', 'Absent')]
|
|
[ValidateNotNullOrEmpty()]
|
|
[System.String]
|
|
$Ensure = 'Present',
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateNotNullOrEmpty()]
|
|
[System.Management.Automation.PSCredential]
|
|
[System.Management.Automation.Credential()]
|
|
$Credential,
|
|
|
|
[ValidateSet('Running', 'Stopped', 'Ignore')]
|
|
[System.String]
|
|
$State = 'Running',
|
|
|
|
[ValidateSet('Automatic', 'Manual', 'Disabled')]
|
|
[System.String]
|
|
$StartupType = 'Automatic'
|
|
)
|
|
|
|
Import-DscResource -ModuleName 'PSDscResources'
|
|
|
|
Node localhost
|
|
{
|
|
ServiceSet ServiceSet1
|
|
{
|
|
Name = $Name
|
|
Ensure = $Ensure
|
|
Credential = $Credential
|
|
State = $State
|
|
StartupType = $StartupType
|
|
}
|
|
}
|
|
}
|