Source |
|
DSC Resource |
|
Documentation |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Mandatory |
Hashtable[] |
List of Windows services |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name |
String |
Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet. |
||
BuiltInAccount |
String |
Indicates the sign-in account to use for the service. |
|
|
DisplayName |
String |
The display name of the service. |
||
Path |
String |
The path to the service executable file. |
||
GroupManagedServiceAccount |
String |
The Group Managed Service Account to run the service under |
||
Credential |
PSCredential |
Indicates credentials for the account that the service will run under. |
||
StartupType |
String |
Indicates the startup type for the service. |
|
|
State |
String |
Indicates the state you want to ensure for the service. If no value is specified a default value is set with the following conditions:
|
|
|
Description |
String |
The description of the service. |
||
StartupTimeout |
Uint32 |
The time to wait for the service to be running in milliseconds. |
Default: |
|
TerminateTimeout |
Uint32 |
The time to wait for the service to be stopped in milliseconds. |
Default: |
|
Dependencies |
String[] |
An array of strings indicating the names of the dependencies of the service. |
||
DesktopInteract |
Boolean |
The service can create or communicate with a window on the desktop.
Must be |
|
|
Ensure |
Boolean |
Indicates whether the target service exists on the system. |
|
WindowsServices:
Services:
- Name: Dummy1
DisplayName: Dummy Service
Path: C:\Dummy.exe
Credential: '[ENC=PE9ianM...=]'
StartupType: Automatic
State: Running
Description: none
Ensure: Present
- Name: Dummy2
StartupType: Manual
Datum.yml
(Excerpt)default_lookup_options: MostSpecific
lookup_options:
WindowsServices:
merge_hash: deep
WindowsServices\Services:
merge_hash_array: UniqueKeyValTuples
merge_options:
tuple_keys:
- Name