From bc11d752c2524abd228982519f0a058fdb8c4a07 Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Fri, 14 Aug 2026 05:53:15 +0200 Subject: [PATCH] docs: Sync fixes from Microsoft Learn (part two) --- .../Microsoft/Adapter/PowerShell/index.md | 2 +- .../examples/manage-a-windows-service.md | 6 +-- .../Adapter/WindowsPowerShell/index.md | 2 +- .../examples/invoke-with-output-data.md | 2 +- .../examples/invoke-with-output-data.md | 2 +- .../Windows/OptionalFeatureList/index.md | 4 +- docs/reference/schemas/config/resource.md | 44 ++++++++++++++++++- 7 files changed, 52 insertions(+), 10 deletions(-) diff --git a/docs/reference/resources/Microsoft/Adapter/PowerShell/index.md b/docs/reference/resources/Microsoft/Adapter/PowerShell/index.md index b7a6875b2..60989728d 100644 --- a/docs/reference/resources/Microsoft/Adapter/PowerShell/index.md +++ b/docs/reference/resources/Microsoft/Adapter/PowerShell/index.md @@ -194,7 +194,7 @@ failure. [01]: ../WindowsPowerShell/index.md [02]: ../../DSC/PowerShell/index.md -[03]: ../../../../schemas/config/resource.md#requireAdapter +[03]: ../../../../schemas/config/resource.md#requireadapter [04]: /powershell/scripting/install/installing-powershell [05]: examples/invoke-a-resource.md [06]: examples/configure-a-machine.md diff --git a/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/examples/manage-a-windows-service.md b/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/examples/manage-a-windows-service.md index 9ef28c0b7..fd226f520 100644 --- a/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/examples/manage-a-windows-service.md +++ b/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/examples/manage-a-windows-service.md @@ -3,12 +3,12 @@ description: > Example showing how to manage a Windows service using the PSDesiredStateConfiguration module with the Microsoft.Adapter/WindowsPowerShell adapter in a DSC configuration document. -ms.date: 03/23/2026 +ms.date: 08/13/2026 ms.topic: reference -title: Manage a Windows service +title: Manage a Windows service with the Windows PowerShell adapter --- -# Manage a Windows service +# Manage a Windows service with the Windows PowerShell adapter This example shows how to use the `Microsoft.Adapter/WindowsPowerShell` adapter with the `PSDesiredStateConfiguration/Service` adapted PSDSC resource to manage a Windows service. These diff --git a/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/index.md b/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/index.md index e39bb81cb..e1b4f0b7c 100644 --- a/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/index.md +++ b/docs/reference/resources/Microsoft/Adapter/WindowsPowerShell/index.md @@ -204,7 +204,7 @@ an error message with details about the failure. [01]: ../PowerShell/index.md [02]: ../../Windows/WindowsPowerShell/index.md -[03]: ../../../../schemas/config/resource.md#requireAdapter +[03]: ../../../../schemas/config/resource.md#requireadapter [04]: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-5.1&preserveView=true [05]: examples/manage-a-windows-service.md [06]: ../../../../schemas/definitions/resourceType.md diff --git a/docs/reference/resources/Microsoft/DSC/Transitional/PowerShellScript/examples/invoke-with-output-data.md b/docs/reference/resources/Microsoft/DSC/Transitional/PowerShellScript/examples/invoke-with-output-data.md index cea9fbd53..1756234c0 100644 --- a/docs/reference/resources/Microsoft/DSC/Transitional/PowerShellScript/examples/invoke-with-output-data.md +++ b/docs/reference/resources/Microsoft/DSC/Transitional/PowerShellScript/examples/invoke-with-output-data.md @@ -880,7 +880,7 @@ instance did modify system state. [01]: ../index.md -[02]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_output_streams?view=powershell-7.6#success-stream +[02]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_output_streams#success-stream [03]: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-output [04]: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-output#-noenumerate [05]: ../index.md#emitting-messages diff --git a/docs/reference/resources/Microsoft/DSC/Transitional/WindowsPowerShellScript/examples/invoke-with-output-data.md b/docs/reference/resources/Microsoft/DSC/Transitional/WindowsPowerShellScript/examples/invoke-with-output-data.md index 338ec8d56..f43cfea2c 100644 --- a/docs/reference/resources/Microsoft/DSC/Transitional/WindowsPowerShellScript/examples/invoke-with-output-data.md +++ b/docs/reference/resources/Microsoft/DSC/Transitional/WindowsPowerShellScript/examples/invoke-with-output-data.md @@ -881,7 +881,7 @@ instance did modify system state. [01]: ../index.md -[02]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_output_streams?view=powershell-7.6#success-stream +[02]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_output_streams#success-stream [03]: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-output [04]: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-output#-noenumerate [05]: ../index.md#emitting-messages diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md index f08d4bd47..ed3c5a795 100644 --- a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md @@ -1,6 +1,6 @@ --- description: Microsoft.Windows/OptionalFeatureList resource reference documentation -ms.date: 04/21/2026 +ms.date: 08/13/2026 ms.topic: reference title: Microsoft.Windows/OptionalFeatureList --- @@ -364,4 +364,4 @@ Common causes include: [04]: ./examples/export-optional-features.md [05]: ../../../../../concepts/resources/properties.md#read-only-resource-properties [06]: ../FeatureOnDemandList/index.md -[07]: /windows-server/administration/windows-commands/dism/dism-operating-system-package-servicing-command-line-options +[07]: /windows-hardware/manufacture/desktop/dism-operating-system-package-servicing-command-line-options diff --git a/docs/reference/schemas/config/resource.md b/docs/reference/schemas/config/resource.md index 6db8a6517..0af1a659f 100644 --- a/docs/reference/schemas/config/resource.md +++ b/docs/reference/schemas/config/resource.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a resource instance in a Desired State Configuration document. -ms.date: 07/03/2025 +ms.date: 08/13/2026 ms.topic: reference title: DSC Configuration document resource instance schema --- @@ -143,6 +143,48 @@ ItemsType: string ItemsPattern: ^\[resourceId\(\s*'\w+(\.\w+){0,2}\/\w+'\s*,\s*'[a-zA-Z0-9 ]+'\s*\)\]$ ``` +### directives + +The `directives` property of a resource instance defines per-instance overrides for how DSC should +process the resource. This property was added in DSC version 3.2. + +```yaml +Type: object +Required: false +``` + +You can define the following directives for a resource instance: + +#### requireAdapter + +The `requireAdapter` directive indicates that DSC should use the specified adapter to invoke the +adapted resource instance. The value for this directive must be the fully qualified type name of +the adapter resource, like `Microsoft.Adapter/PowerShell`. + +When this directive isn't specified, DSC invokes the adapted resource through the first discovered +adapter that indicates it can invoke the resource. This directive has no effect on nonadapted +resource instances. + +```yaml +Type: string +Required: false +Pattern: ^\w+(\.\w+){0,2}\/\w+$ +``` + +#### securityContext + +The `securityContext` directive indicates that DSC should validate the current security context +against this directive before invoking the resource. This value overrides the +`metadata.Microsoft.DSC.securityContext` setting for the top level of the configuration document. +This enables you to selectively require or forbid elevated security contexts for a specific +resource instance. + +```yaml +Type: string +Required: false +ValidValues: [Current, Elevated, Restricted] +``` + [01]: ../definitions/resourceType.md [02]: functions/resourceId.md [03]: ../../../glossary.md#nested-resource-instance