Import-DscResource dependent on external assembly

Welcome Forums DSC (Desired State Configuration) Import-DscResource dependent on external assembly

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
3 years, 6 months ago.

  • Author
    Posts
  • #25450

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    Please ignore – User Error :-s

The topic ‘Import-DscResource dependent on external assembly’ is closed to new replies.