Skip to content

Commit b1c66b4

Browse files
committed
License DSC Fixes and Sample improvement
1 parent 1db828e commit b1c66b4

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

UnitySetup/DSCResources/xUnityLicense/xUnityLicense.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
[OutputType([System.Collections.Hashtable])]
44
param
55
(
6+
[parameter(Mandatory = $true)]
67
[System.Management.Automation.PSCredential]
78
$Credential,
89

10+
[parameter(Mandatory = $true)]
911
[System.Management.Automation.PSCredential]
1012
$Serial,
1113

14+
[parameter(Mandatory = $false)]
1215
[System.String]
1316
$UnityVersion,
1417

18+
[parameter(Mandatory = $true)]
1519
[System.String]
1620
$Name
1721
)
@@ -64,6 +68,7 @@ function Test-TargetResource {
6468
[OutputType([System.Boolean])]
6569
param
6670
(
71+
[parameter(Mandatory = $true)]
6772
[System.Management.Automation.PSCredential]
6873
$Credential,
6974

@@ -75,6 +80,7 @@ function Test-TargetResource {
7580
[System.Management.Automation.PSCredential]
7681
$Serial,
7782

83+
[parameter(Mandatory = $false)]
7884
[System.String]
7985
$UnityVersion,
8086

UnitySetup/Examples/Sample_xUnity.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<#
22
Create a custom configuration by passing in necessary values
33
#>
4-
Configuration Sample_xUnitySetupInstance {
4+
Configuration Sample_xUnity {
55
param
66
(
77
[System.String]
8-
$Versions = '2017.4.2f2'
8+
$Version = '2017.4.2f2',
99

1010
[ValidateSet('Present', 'Absent')]
1111
[System.String]
@@ -26,18 +26,19 @@ Configuration Sample_xUnitySetupInstance {
2626
Node 'localhost' {
2727

2828
xUnitySetupInstance Unity {
29-
Versions = $Versions
29+
Versions = $Version
3030
Components = $Components
3131
Ensure = $Ensure
32-
DependsOn = if( $Ensure -eq 'Absent' ) { '[xUnityLicense]UnityLicense' }
32+
DependsOn = if( $Ensure -eq 'Absent' ) { '[xUnityLicense]UnityLicense' } else { $null }
3333
}
3434

3535
xUnityLicense UnityLicense {
3636
Name = 'UL01'
3737
Credential = $UnityCredential
3838
Serial = $UnitySerial
3939
Ensure = $Ensure
40-
DependsOn = if( $Ensure -eq 'Present' ) { '[xUnitySetupInstance]Unity' }
40+
UnityVersion = $Version
41+
DependsOn = if( $Ensure -eq 'Present' ) { '[xUnitySetupInstance]Unity' } else { $null }
4142
}
4243
}
4344
}

UnitySetup/Examples/Sample_xUnity_Install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#
22
Install multiple versions of Unity and several components
33
#>
4-
Configuration Sample_xUnitySetupInstance_Install {
4+
Configuration Sample_xUnity_Install {
55

66
param(
77
[PSCredential]$UnityCredential,

UnitySetup/Examples/Sample_xUnity_Uninstall.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#
22
Uninstall multiple versions of Unity
33
#>
4-
Configuration Sample_xUnitySetupInstance_Install {
4+
Configuration Sample_xUnity_Install {
55

66
param(
77
[PSCredential]$UnityCredential,

0 commit comments

Comments
 (0)