Skip to content

Commit 09a2d9a

Browse files
Merge pull request #30 from mrhockeymonkey/supports-sessiontype
Adding Support for Specifying Session Type
2 parents 00fc9a6 + 772d34f commit 09a2d9a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

DSCClassResources/JeaSessionConfiguration/JeaSessionConfiguration.psm1

+18
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class JeaSessionConfiguration {
3939
[DscProperty()]
4040
[string[]] $ScriptsToProcess
4141

42+
## The optional session type for the endpoint
43+
[DscProperty()]
44+
[string] $SessionType
45+
4246
## The optional switch to enable mounting of a restricted user drive
4347
[Dscproperty()]
4448
[bool] $MountUserDrive
@@ -161,6 +165,11 @@ class JeaSessionConfiguration {
161165
$configurationFileArguments["TranscriptDirectory"] = $this.TranscriptDirectory
162166
}
163167

168+
## SessionType
169+
if($this.SessionType) {
170+
$configurationFileArguments["SessionType"] = $this.SessionType
171+
}
172+
164173
## Startup scripts
165174
if ($this.ScriptsToProcess) {
166175
$configurationFileArguments["ScriptsToProcess"] = $this.ScriptsToProcess
@@ -335,6 +344,11 @@ class JeaSessionConfiguration {
335344
return $false
336345
}
337346

347+
if($currentInstance.SessionType -ne $this.SessionType) {
348+
Write-Verbose "SessionType not equal: $($currentInstance.SessionType)"
349+
return $false
350+
}
351+
338352
if (-not $this.ComplexObjectsEqual($currentInstance.ScriptsToProcess, $this.ScriptsToProcess)) {
339353
Write-Verbose "ScriptsToProcess not equal: $(ConvertTo-Json $currentInstance.ScriptsToProcess -Depth 100)"
340354
return $false
@@ -592,6 +606,10 @@ class JeaSessionConfiguration {
592606
$returnObject.TranscriptDirectory = $configFileArguments.TranscriptDirectory
593607
}
594608

609+
if($configFileArguments.SessionType) {
610+
$returnObject.SessionType = $configFileArguments.SessionType
611+
}
612+
595613
if ($configFileArguments.ScriptsToProcess) {
596614
$returnObject.ScriptsToProcess = $configFileArguments.ScriptsToProcess
597615
}

0 commit comments

Comments
 (0)