forked from microsoft/unitysetup.powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSample_xUnity.ps1
More file actions
44 lines (36 loc) · 1.1 KB
/
Copy pathSample_xUnity.ps1
File metadata and controls
44 lines (36 loc) · 1.1 KB
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
<#
Create a custom configuration by passing in necessary values
#>
Configuration Sample_xUnity {
param
(
[System.String]
$Version = '2017.4.2f2',
[ValidateSet('Present', 'Absent')]
[System.String]
$Ensure = 'Present',
[System.String[]]
$Components = @('Windows', 'Mac', 'Linux', 'UWP', 'iOS', 'Android'),
[PSCredential]
$UnityCredential,
[PSCredential]
$UnitySerial
)
Import-DscResource -ModuleName UnitySetup
Node 'localhost' {
xUnitySetupInstance Unity {
Versions = $Version
Components = $Components
Ensure = $Ensure
DependsOn = if( $Ensure -eq 'Absent' ) { '[xUnityLicense]UnityLicense' } else { $null }
}
xUnityLicense UnityLicense {
Name = 'UL01'
Credential = $UnityCredential
Serial = $UnitySerial
Ensure = $Ensure
UnityVersion = $Version
DependsOn = if( $Ensure -eq 'Present' ) { '[xUnitySetupInstance]Unity' } else { $null }
}
}
}