Please feel free to provide feedback or file bugs here.

Import-DSCResource for File, others fails

When using Import-DSCResource -Name, various OOB resources do not work. Consider 'File' which is a built in resource, the following code will fail.

Configuration Sample
{
Import-DSCResource -Name File

# This will generate two .mof files, a localhost.mof, and a server02.mof
Node @('localhost', 'server02')
{
File SampleFile
{
DestinationPath = 'C:\Temp\temp.txt'
Contents = 'This is a simple resource to show Configuration functionality on a Node.'
}
}
}

Sample -OutputPath P:\temp\

Start-DSCConfiguration P:\temp -computername localhost -wait -verbose

If you change the resource to Service, it works as expected.

I'm guessing this is because File is a binary resource under System32\Configuration, but it is not documented.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Bobby Reed shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base