DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Pending reboot should have embedded schema for assertions

Open Gijsreyn opened this issue 7 months ago • 0 comments

Summary of the new feature / enhancement

When working on a new book on LeanPub, I was exploring assertions in more depth. After adding the Microsoft.Windows/RebootPending configuration, I was hit with the following error:

image

I couldn't find anything directly in the docs about why this was, but after fiddling in the following schema into the JSON resource manifest:

"schema": {
      "command": {
        "executable": "powershell",
        "args": [
          "-NoLogo",
          "-NonInteractive",
          "-NoProfile",
          "-Command",
          "reboot_pending.resource.ps1"
        ]
      }
    }

It returned the reboot pending state. I know the resource is old and might not be shipped in the next releases. However, if you want I can create the pull request, or just keep it in the book "as is".

Proposed technical implementation details (optional)

No response

Gijsreyn avatar Jul 10 '24 13:07 Gijsreyn