MicrosoftDocs / PowerShell-Docs-DSC

Documentation for PowerShell Desired State Configuration
https://learn.microsoft.com/powershell/dsc/overview
Creative Commons Attribution 4.0 International
31 stars 36 forks source link

DSC 3.0 doc examples are outdated #147

Closed xgqt closed 1 year ago

xgqt commented 1 year ago

Prerequisites

Version

v3.0

Links

https://learn.microsoft.com/en-us/powershell/dsc/getting-started/getting-started?view=dsc-3.0

Summary

Examples of dsc-3.0 configurations are outdated, they are the same as dsc-2.0 examples.

Details

For example, the following code does not work on DSC 3.0:

Invoke-DscResource @{
  Name = 'Environment'
  ModuleName = 'PSDscResources'
  Property = @{
    Name = 'TestEnvironmentVariable'
    Value = 'TestValue'
    Ensure = 'Present'
    Path = $false
    Target = @('Process', 'Machine')
  }
  Method = Test
}

Suggested Fix

No response

xgqt commented 1 year ago

Thanks!