Compiling MOFs on Linux for Windows targets


This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 5 days, 3 hours ago.

  • Author
  • #54737


    Has anyone tried this yet, now that Microsoft has pushed alphas of PowerShell and updated versions of DSC for Linux? I can actually compile MOFs on Linux, but of course the built-in Windows resources like "Registry" don't exist on Linux – for obvious reasons.

    To cross-compile MOFs for Linux targets from Windows, there is the nx package on PowerShellGallery:

    I'm wondering if the Windows specific built-ins are published somewhere?


  • #55331
    Profile photo of Don Jones
    Don Jones

    Well... so, let's do some terminology. "The DSC resources that ship with the Windows OS" depends on the OS and version of WMF installed; you're probably best off just running Get-DscResource on a sample machine to see.

    Is that what you meant?

    Or, are you asking, "is there a way I can get modules for the Windows resources, on Linux, so that I can compile a for-Windows MOF on a Linux system?" In which case, no, there aren't. The Linux DSC package wasn't written by the PowerShell team, and the focus was on making it a good client – not so much a good authoring environment. Keeping in mind that, when the Linux DSC was written, PowerShell didn't exist on Linux so authoring there wasn't possible.

You must be logged in to reply to this topic.