Skip to content

Some doc fixes #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: >
Examples showing how you can invoke the Microsoft.Windows/WindowsPowerShell with DSC to manage
Examples showing how you can invoke the Microsoft.Windows/WindowsPowerShell with DSC to manage
a Windows service using the PSDesiredStateConfiguration module.

ms.date: 03/25/2025
Expand Down Expand Up @@ -54,7 +54,7 @@ When the resource configures the service, DSC returns the following result:

```yaml
beforeState:
Status: null /
Status: null
Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers.
DisplayName: Print Spooler
ResourceId: null
Expand Down Expand Up @@ -109,7 +109,7 @@ dsc resource test --resource PSDesiredStateConfiguration/Service --input $instan

```yaml
desiredState:
Name: Spooler
Name: Spooler
StartupType: Manual
actualState:
InDesiredState: true
Expand All @@ -135,7 +135,7 @@ When the resource stops the service, DSC returns the following result:

```yaml
beforeState:
Status: null
Status: null
Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers.
DisplayName: Print Spooler
ResourceId: null
Expand Down Expand Up @@ -192,7 +192,7 @@ dsc resource get --resource PSDesiredStateConfiguration/Service --input $instanc

```yaml
actualState:
Status: null
Status: null
Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers.
DisplayName: Print Spooler
ResourceId: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ To list the schema properties for a PowerShell DSC resource, you can run the fol

```powershell
dsc resource list --adapter Microsoft.Windows/WindowsPowerShell <moduleName>/<resourceName> |
ConvertFrom-Json |
ConvertFrom-Json |
Select-Object properties
```

Expand All @@ -141,7 +141,7 @@ You can also retrieve more information by directly reading it from the cache fil
$cache = Get-Content -Path "$env:LOCALAPPDATA\dsc\WindowsPSAdapterCache.json" |
ConvertFrom-Json

($cache.ResourceCache | Where-Object -Property type -EQ '<moduleName>/<resourceName>').DscResourceInfo.Properties
($cache.ResourceCache | Where-Object -FilterScript { $_.type -eq '<moduleName>/<resourceName>' }).DscResourceInfo.Properties
```

When defining a configuration document, the following properties are required.
Expand Down