locked
PowerShell DSC - Is it possible to get the MOF generated on scheduled date and time ? RRS feed

  • Question

  • Hi Folks,

    I have been working on some task with PowerShell DSC (Task on coding a configuration to start a service and to create/modify registry values using DSC resources). So I have my configuration file ready and once complied it will generate the respective .mof file. 

    Now I want to know if we can schedule this .mof file generation ? which means the .mof should be generated only on the date and time which i have specified. 

    Please let me know your suggestions. 

    Thanks

    AMK

    Tuesday, September 12, 2017 1:38 PM

All replies

  • Hi,

    This is a quick note to let you know that I am currently performing research on this issue and will get back to you as soon as possible. I appreciate your patience.
    If you have any updates during this process, please feel free to let me know.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wednesday, September 13, 2017 10:06 AM
  • Thanks Albert...

    I have an other thought as well. Either the .mof should be generated on schedule (on specific date and time) or thinking of starting the DSCconfiguration on schedule, means start-dscconfiguration to be initiated on specific date and time just after .mof is normally generated.

    I'm also finding if any possibilities with System.Timers.Timer

    Thanks

    AMK

    Wednesday, September 13, 2017 4:16 PM
  • Hi AMK,

    Based on your situation, you could try to schedule the code complied date. And after the code executes, the MOF file will be generated.
    In this case, you could use GPO or task schedule trigger your script.

    If you need further help, please feel free to let us know.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, September 14, 2017 7:53 AM
  • Hi,

    Just want to confirm the current situations. Have you tried to schedule the code which provided before?

    If you already tried them or the issue remains after trying them, please don’t hesitate to tell me. I will do more research and try my best to give you helpful suggestions.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, September 19, 2017 8:54 AM
  • Hi,

    I am checking how the issue is going, if you still have any questions, please feel free to contact us.

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.

    Appreciate for your feedback.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, September 22, 2017 5:57 AM
  • Hi Albert,

    Sorry for my delay in reply... I was into some other engagements and didnt check technet last month. 

     As per you the concept of using the GPO is fine and scheduling the code in tasksheduler. But i dont want to use GPO.. I wanted DSC to handle its own stuffs as 1 men army without taking help of other Microsoft resources or components.. :)

    I have got an idea in a different level... (i was looking to create an app and DSC being responsible forcore functions behind the app) The idea is to integrate DSC with ServiceNow, where sevicenow initiates the DSC scripts at the desired time we want, becuase for the current level of working on visual studio C# needs lots of tweeks or major changes and also lots of exceptions needs to be handled. Moreover it has be a web app level to trigger DSC script or .MOF generation so its not possible to make it happen with windows app. Thus i found SNOW would be the best option for me to run my DSC.

    Thanks

    Arun

    Wednesday, October 11, 2017 7:10 AM