Session configurations
The next piece of the puzzle is session configurations. Once you are convinced that you have the right roles defined and that all role capability files are created and placed in a module, you need to create a new session configuration. Session configuration has been around since PowerShell 2, while the cmdlet to create a new session configuration file became available in PowerShell 3:
# Again, it is easier to edit the file manually
$sessionConfigurationOptions = @{
Path = '.\SessionConfig.pssc'
SessionType = 'RestrictedRemoteServer'
TranscriptDirectory = 'C:\Transcripts'
RunAsVirtualAccount = $true
LanguageMode = 'ConstrainedLanguage'
RoleDefinitions = @{
'contoso\FirstLevelSupport' = @{RoleCapabilities = 'FirstLevelUserSupport'}
}
}
New-PSSessionConfigurationFile @sessionConfigurationOptions
Language mode and session type
The language mode and session type control which cmdlets and PowerShell engine features are available to connecting...