-
Notifications
You must be signed in to change notification settings - Fork 0
/
DSCRunner.ps1
59 lines (41 loc) · 1.54 KB
/
DSCRunner.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#$VerbosePreference = 'Continue'
<#
Start-Configuration
# Process starts, takes configurations specified.
HAS TO:
- Import Modules.
- Provide $nodedata.
- Compile Mof.
- Execute MOF's on localhost or defined endpoint.
Limitations:
This is a testing framework, do not venture above.
Potentil:
Add pester into the mix.
#>
# Setting Environment
$env:PSModulePath = $env:PSModulePath + ";$PSScriptRoot\RequiredModules;$PSScriptRoot\Configurations;"
$VerbosePreference = 'Continue'
# testing parameters
$tpa = @{}
#$tpa.add("Verbose",$true)
set-location $PSScriptRoot\Execution
# Importing Module
Write-Verbose "======================================="
Write-Verbose "Sanitizing environment."
Write-Verbose "======================================="
Remove-Module $PSScriptRoot\DSCRunner.psm1 -ea SilentlyContinue
Write-Verbose "======================================="
Write-Verbose "Importing dependencies."
Write-Verbose "======================================="
Import-Module $PSScriptRoot\DSCRunner.psm1
Write-Verbose "======================================="
Write-Verbose "Syncing configuration data."
Write-Verbose "======================================="
Write-Verbose "======================================="
Write-Verbose "Syncing configuration data."
Write-Verbose "======================================="
Sync-ConfigurationData ( Get-LaunchJson ) @tpa
Write-Verbose "======================================="
Write-Verbose "Executing configurations."
Write-Verbose "======================================="
Start-ConfigurationFactory @tpa