Replies: 2 comments 1 reply
-
Hey @dummys, what you're looking for is $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Stop service
type: PSDesiredStateConfiguration/Service
properties:
name: AJRouter
state: Stopped
startupType: Disabled
dependsOn:
- "[resourceId('Microsoft.DSC/Assertion','Assert service present')]"
- name: Assert service present
type: Microsoft.DSC/Assertion
properties:
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: AJRouter
type: PSDesiredStateConfiguration/Service
properties:
name: AJRouter Do note, it is using the new syntax only available from preview.2 versions onwards for declaring adapter resources. Let me know if that works! |
Beta Was this translation helpful? Give feedback.
-
Hello, The problem with assertion, is that if it failed, it stop the execution. In my case I want to continue because it is possible that such services doesn't exist in Windows 11 and exist in Windows 10 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm using DSC to configure multiple computer that can have Windows 10/11 with/without certain services.
I was using DSC 2.0 to do it with the following code:
I tried to implement it in DSC 3.0 for for now I can't make it work, here is my resources.yaml:
And I apply with:
dsc config set --file resources.yaml
but I get the following error:Beta Was this translation helpful? Give feedback.
All reactions