Import-DscResource dependent on external assembly

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Kris Parr Kris Parr 2 years ago.

  • Author
    Posts
  • #25450
    Profile photo of Kris Parr
    Kris Parr
    Participant

    I'm creating a dsc configuration to install and configure a SQL box. I have created some custom resources using SQL management objects Microsoft.SqlServer.Smo.dll.

    The problem I get is that when the import-dscresource runs on the server it tries to load all the resource modules which in turn tries to load the Microsoft.SqlServer.Smo.dll. This DLL won't be available on the server until the SQL install has run and complete.

    Is there anyway to prevent the DSC resource trying to load the external assembly until it runs the DSCResource ? I have made the DSCResource dependent on the SQL Server install completing successfully, but the import-module runs at the start of the script regardless.

  • #25452
    Profile photo of Kris Parr
    Kris Parr
    Participant

    Please ignore – User Error :-s

You must be logged in to reply to this topic.