Skip to content

Not implemented: Custom resource not supported - Managing a Windows Service #693

Closed

Description

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

I'm new to DSC v3 but not to DSC. I'm on Windows Server 2025, using PowerShell 7.5. I created this configuration file :

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json

resources:
  - name: Ensure Spooler Running
    type: PSDesiredStateConfiguration/Service
    adapter: Microsoft.Windows/WindowsPowerShell
    properties:
      Name: Spooler
      State: Running

I would like to configure a Windows Service to begin my learning journey of DSC v3 but I have to say, this is not a straightforward path.

Here's the command I type to test (or set) the configuration :
dsc config get -f C:\Scripts\DSCv3_configService.yaml

and here's the error message I'm receiving :
2025-03-13T23:24:52.082168Z ERROR Not implemented: Custom resource not supported

Am I doing something wrong or you have not yet implemented the Windows PowerShell DSC adapter?
Or maybe there's another way to do so? Could you please help me?

Thanks.

Steps to reproduce

Here's my config :

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json

resources:
  - name: Ensure Spooler Running
    type: PSDesiredStateConfiguration/Service
    adapter: Microsoft.Windows/WindowsPowerShell
    properties:
      Name: Spooler
      State: Running

Here's the command I type to test (or set) the configuration :
dsc config get -f C:\Scripts\DSCv3_configService.yaml

Error : 2025-03-13T23:24:52.082168Z ERROR Not implemented: Custom resource not supported

Expected behavior

I dunno

Actual behavior

`2025-03-13T23:24:52.082168Z ERROR Not implemented: Custom resource not supported`

Error details

2025-03-13T23:24:52.082168Z ERROR Not implemented: Custom resource not supported

Environment data

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.0
PSEdition                      Core
GitCommitId                    7.5.0
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

3.0.0

Visuals

No response

Activity

  1. SteveL-MSFT commented on Mar 14, 2025

    @SteveL-MSFT
    Member

    There seems to be a regression somewhere. You don't specify the adapter as that's determined at runtime and automatically used, but alternatively you can be explicit this way:

    # Example configuration mixing native app resources with classic PS resources
    $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
    resources:
    - name: Use Windows PowerShell resources
      type: Microsoft.Windows/WindowsPowerShell
      properties:
        resources:
        - name: Check Spooler service
          type: PsDesiredStateConfiguration/Service
          properties:
            Name: Spooler
            State: Running

    However, I noticed some other problems I'll fix at the same time.

  2. apetitjean commented on Mar 16, 2025

    @apetitjean
    Author

    That's for the workaround Steeve, but also for your anwser's velocity ;-).

    I wondered if there's another way to manage the Windows Services? I think about the native DSC v3 resource if there's any.

  3. SteveL-MSFT commented on Mar 19, 2025

    @SteveL-MSFT
    Member

    That's for the workaround Steeve, but also for your anwser's velocity ;-).

    I wondered if there's another way to manage the Windows Services? I think about the native DSC v3 resource if there's any.

    There will eventually be a DSCv3 resource for Windows Services, but don't expect it anytime soon unless someone else writes it :)

    This fix will take a bit longer than I expected as the way dsc resource get -r ... works in this case is passing some metadata to the adapter to handle it. This requires every adapter to implement this. Instead, I'm working on a more general solution where it's not something adapters need to cover explicitly by converting the call into a new config at runtime (so essentially turning the short syntax to the long syntax).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions