Templates/Compile_Azure_DSC_Node.config.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#region Azure Login

Login-AzureRmAccount

#endregion

#region upload config



Import-AzureRmAutomationDscConfiguration -SourcePath "<fill me in>" `
                                         -Published `
                                         -ResourceGroupName "<fill me in>" `
                                         -AutomationAccountName "<fill me in>" `
                                         -Force

#endregion

#region compile config

$ConfigData = @{             
    AllNodes = @(             
        @{             
            Nodename = "*"             
        }

        @{             
            Nodename = "<fill me in>"
            Role = "<fill me in>"             
        }
        
       
   )             
}             

Start-AzureRmAutomationDscCompilationJob -ResourceGroupName "<fill me in>" `
                                         -AutomationAccountName "<fill me in>" `
                                         -ConfigurationName "<fill me in>" `
                                         -ConfigurationData $ConfigData

#endregion