Skip to content

Commit d239d56

Browse files
committed
Add license documentation
1 parent 46b0561 commit d239d56

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,28 @@ Find-UnitySetupInstaller -Version '2017.3.0f3' | Install-UnitySetupInstance
115115
Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version '2017.3.0f3')
116116
```
117117

118+
Manage Unity licenses.
119+
```powershell
120+
# Get any active licenses
121+
Get-UnityLicense
122+
123+
# Example Output:
124+
# LicenseVersion : 6.x
125+
# Serial : System.Security.SecureString
126+
# UnityVersion : 2017.4.2f2
127+
# DisplaySerial : AB-CDEF-GHIJ-KLMN-OPQR-XXXX
128+
# ActivationDate : 2017-07-13 16:32:16
129+
# StartDate : 2017-07-12 00:00:00
130+
# StopDate : 2019-01-01 00:00:00
131+
# UpdateDate : 2018-05-11 23:47:10
132+
133+
# Activate a license
134+
Start-UnityEditor -Credential <unityAccount> -Serial <unitySerial> -Wait
135+
136+
# Return license
137+
Start-UnityEditor -Credential <unityAccount> -ReturnLicense -Wait
138+
```
139+
118140
### DSC
119141
UnitySetup includes the xUnitySetupInstance DSC Resource. An example configuration might look like:
120142

@@ -123,16 +145,29 @@ UnitySetup includes the xUnitySetupInstance DSC Resource. An example configurati
123145
Install multiple versions of Unity and several components
124146
#>
125147
Configuration Sample_xUnitySetupInstance_Install {
148+
param(
149+
[PSCredential]$UnityCredential,
150+
[PSCredential]$UnitySerial
151+
)
126152
127153
Import-DscResource -ModuleName UnitySetup
128154
129155
Node 'localhost' {
130156
131157
xUnitySetupInstance Unity {
132-
Versions = '2017.3.1f1,2018.1.0b9'
158+
Versions = '2017.4.2f2,2018.1.0f2'
133159
Components = 'Windows', 'Mac', 'Linux', 'Metro', 'iOS'
134160
Ensure = 'Present'
135161
}
162+
163+
xUnityLicense UnityLicense {
164+
Name = 'UL01'
165+
Credential = $UnityCredential
166+
Serial = $UnitySerial
167+
Ensure = 'Present'
168+
UnityVersion = '2017.4.2f2'
169+
DependsOn = '[xUnitySetupInstance]Unity'
170+
}
136171
}
137172
}
138173
```

0 commit comments

Comments
 (0)