Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

added sessiontype property for dsc config #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class JeaEndpoint
[DscProperty()]
[string[]] $ScriptsToProcess

## The optional session type for the endpoint
[DscProperty()]
[string] $SessionType

## The optional switch to enable mounting of a restricted user drive
[Dscproperty()]
[bool] $MountUserDrive
Expand Down Expand Up @@ -163,6 +167,12 @@ class JeaEndpoint
$configurationFileArguments["TranscriptDirectory"] = $this.TranscriptDirectory
}

## SessionType
if($this.SessionType)
{
$configurationFileArguments["SessionType"] = $this.SessionType
}

## Startup scripts
if($this.ScriptsToProcess)
{
Expand Down Expand Up @@ -382,6 +392,12 @@ class JeaEndpoint
return $false
}

if($currentInstance.SessionType -ne $this.SessionType)
{
Write-Verbose "SessionType not equal: $($currentInstance.SessionType)"
return $false
}

if(-not $this.ComplexObjectsEqual($currentInstance.ScriptsToProcess, $this.ScriptsToProcess))
{
Write-Verbose "ScriptsToProcess not equal: $(ConvertTo-Json $currentInstance.ScriptsToProcess -Depth 100)"
Expand Down Expand Up @@ -647,6 +663,11 @@ class JeaEndpoint
$returnObject.TranscriptDirectory = $configFileArguments.TranscriptDirectory
}

if($configFileArguments.SessionType)
{
$returnObject.SessionType = $configFileArguments.SessionType
}

if($configFileArguments.ScriptsToProcess)
{
$returnObject.ScriptsToProcess = $configFileArguments.ScriptsToProcess
Expand Down