FirstFile Failed In Start-DSCConfiguration

This topic contains 18 replies, has 7 voices, and was last updated by  Arie H 1 year, 9 months ago.

  • Author
    Posts
  • #26444

    Aravinda Cat
    Participant

    HI All,

    I am getting one weird issue while running the Start-DSCConfiguration command for a configuration.

    FindFirstFile Failed.
    + CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName : localhost

    Checked the event log , found nothing helpful. Please help me with advice\suggestions.

    Thanks,
    Aravinda

  • #26446

    Dave Wyatt
    Moderator

    What version of WMF are you running? Have you recently upgraded from one of the preview versions to another?

    You can try deleting the files (but not the subfolders) in C:\Windows\System32\Configuration , then applying your configuration again to see if that clears up the problem.

  • #26448

    Aravinda Cat
    Participant

    WMF Version : 3
    Didn't update anything in the server and I tried the script after deleting the files from the location mentioned. Still getting the same issue.

    Thanks

  • #26450

    Dave Wyatt
    Moderator

    DSC requires at least WMF version 4.0.

  • #26455

    Aravinda Cat
    Participant

    Sorry for the wrong info. It is 4.0 . Thing is that the security for the C:\Windows\System32\Configuration directory is changed due to which It is unable to fetch the file from there.

    So, can I undo the security as it was before by doing any changes in WMF or reinstalling it in a windows server 2012?

  • #26457

    Dave Wyatt
    Moderator

    You could try restoring the permissions. Here's what I have on my system:

    Owner: TrustedInstaller

    TrustedInstaller, Full Control, Folder and subfolders
    SYSTEM, Modify, This folder only
    SYSTEM, Full Control, Subfolders and files only
    Administrators, Modify, This folder only
    Administrators, Full Control, Subfolders and files only
    CREATOR OWNER, Full Control, Subfolders and files only
    ALL APPLICATION PACKAGES, Read & execute, This folder, subfolders and files
    WinRM, Read, Subfolders and files only

  • #34180

    Andy Townsend
    Participant

    Has anyone else had this and managed to resolve it? I'm getting it on a new box that's just been built. Another one built at the same time is fine

  • #34774

    Juris Krumins
    Participant

    Me having the same issue. Anyone have been managed to solve this issue ? I'm running WFM 5.0 Prod Preview on Windows 2012 R2

  • #34784

    Justin King
    Participant

    So, in version 4, make sure that update KB2883200 is installed. If it' not I've seen all sorts of weird things happen including DSC claiming a module wasn't available even though it was (was downloaded and ready ... had to reboot before the server "found" it).

    Install it manually. In some odd instances, I've even seen WSUS claim it was "already installed or not needed" yet if i manually looked at the node it was missing so i manually had to install it.

    I can't comment on WMF5 ... I'm still a bit jaded by the versioning nightmare that is.

  • #34786

    Juris Krumins
    Participant

    Hi. Thanks for reply. I've actually managed to solve this issue. And it was caused by my faulty DSC custom and combined resource code, that actually manage Current and Pending DSC configuration (deploy it) and DSC modules in C:\Program Files\WindowsPowerShell\Modules directory. So as a result of the bug every subdirectory under C:\Program Files\WindowsPowerShell\ directory have been removed and new modules have been deployed directly under C:\Program Files\WindowsPowerShell\. As soon as I've fixed this, issue have been solved.

  • #34787

    Dave Wyatt
    Moderator

    Interesting... presumably an empty Modules folder wouldn't matter, but maybe the LCM doesn't handle the situation of the Modules folder being outright deleted. Wonder if that's true of any other paths that might trigger a similar bug.

  • #34807

    Juris Krumins
    Participant

    I've tested things out and it's not about Modules folder (it's existence or absence), it's about existence of "C:\Program Files\WindowsPowerShell\Configuration" folder. When I remove/rename it I can clearly reproduce this error.

  • #34824

    Dave Wyatt
    Moderator

    Well, one really shouldn't be renaming or deleting anything in the system32 directory... It's generally a bad for your operating system. 😉 (That said, they _could_ make the LCM more robust so it just recreates that folder if needed, but still.)

  • #34828

    Juris Krumins
    Participant

    The directory is not not in system32, it's in "C:\Program Files\WindowsPowerShell\". But , yes I completely agree with you. Anyway, this happened accidentally. 🙂

  • #34830

    Dave Wyatt
    Moderator

    Oh, I misread... wasn't aware there _was_ a Configuration folder in Program Files. Wonder what it's for.

  • #35658

    Brandon
    Participant

    I had this same issue. In my case I resolved it by making sure the following directory existed:

    C:\Program Files\WindowsPowerShell\Configuration\Schema

    The folder is empty, and I'm not sure what purpose it served.

  • #35731

    Arie H
    Participant

    The program files configuration folder is where you would place your resources and the ones tour using in your scripts. Seen people place them in system32 which is a bad habit and I think its even documents on where MS would like us the users to place our modules and configurations iirc.

  • #35734

    Juris Krumins
    Participant

    This is not about placing stuff in system32. It's all about system reaction to absence of some sub-directories in "C:\Program Files\WindowsPowerShell". At least in my case.

  • #35737

    Arie H
    Participant

    Was referring to Dave's comment 😉

You must be logged in to reply to this topic.