-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDemoConfig.ps1
38 lines (36 loc) · 1.04 KB
/
DemoConfig.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
Configuration DemoConfig {
Import-DscResource -ModuleName 'PSDscResources'
WindowsFeature WebServer {
Ensure = 'Present'
Name = 'Web-Server'
}
Script DownloadMsi {
GetScript =
{
@{
GetScript = $GetScript
SetScript = $SetScript
TestScript = $TestScript
Result = ('True' -in (Test-Path d:\depagent.exe))
}
}
SetScript =
{
#Download files to temporary storage
Invoke-WebRequest https://aka.ms/dependencyagentwindows -OutFile d:\depagent.exe
}
TestScript =
{
$Status = ('True' -in (Test-Path d:\depagent.exe))
$Status -eq $True
}
}
Package InstallDepAgent {
Ensure = 'Present'
Name = 'Dependency Agent'
Path = d:\depagent.exe
Arguments = '/S /AcceptEndUserLicenseAgreement:1'
ProductId = ''
DependsOn = '[Package]InstallMMAAgent'
}
}