Q. How do I enable tab completion when using a restricted custom PowerShell endpoint?
A. When using a constrained endpoint in PowerShell you may find autocomplete does not work. This is because the tab complete is actually enabled via a function called Function:\TabExpansion2 which is not available. To fix simple may the function available in the constrained endpoint via the VisibleFunctions parameter, for example:
New-PSSessionConfigurationFile –ModulesToImport OneMOD, ActiveDirectory `
-VisibleCmdLets ('*OneMOD*','*AD*') `
-VisibleFunctions ('TabExpansion2') -VisibleAliases ('exit') –LanguageMode 'ConstrainedLanguage' `
-SessionType 'RestrictedRemoteServer' –Path 'c:\onemodonly.pssc'
0 comments
Hide comments