@@ -270,31 +270,7 @@ public static Runspace CreateRunspace(
270
270
powerShellContext . ConsoleReader = hostUserInterface ;
271
271
return CreateRunspace ( psHost , hostDetails . InitialSessionState ) ;
272
272
}
273
- private static InitialSessionState GetUsefulConstrainedISS ( )
274
- {
275
- InitialSessionState iss = InitialSessionState . Create ( "Microsoft.PowerShell.Core" ) ;
276
- iss . LanguageMode = PSLanguageMode . ConstrainedLanguage ;
277
- iss . ImportPSModule ( new string [ ] { "Microsoft.Powershell.Utility" , "Microsoft.Powershell.Core" , "Microsoft.PowerShell.Security" } ) ;
278
-
279
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Get-Command" , typeof ( GetCommandCommand ) , null ) ) ;
280
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Get-ChildItem" , typeof ( PSCommand ) , null ) ) ; //
281
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Export-ModuleMember" , typeof ( ExportModuleMemberCommand ) , null ) ) ;
282
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Where-Object" , typeof ( WhereObjectCommand ) , null ) ) ;
283
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Select-Object" , typeof ( PSCommand ) , null ) ) ;
284
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Set-Variable" , typeof ( PSCommand ) , null ) ) ;
285
- iss . Commands . Add ( new SessionStateCmdletEntry ( "ForEach-Object" , typeof ( ForEachObjectCommand ) , null ) ) ;
286
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Format-List" , typeof ( PSCommand ) , null ) ) ;
287
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Format-Table" , typeof ( PSCommand ) , null ) ) ;
288
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Set-ExecutionPolicy" , typeof ( PSCommand ) , null ) ) ;
289
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Format-Hex" , typeof ( PSCommand ) , null ) ) ;
290
- //iss.Commands.Add(new SessionStateCmdletEntry("Out-Default", typeof(OutDefaultCommand), null));
291
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Microsoft.PowerShell.Core\\ Out-Default" , typeof ( OutDefaultCommand ) , null ) { Visibility = SessionStateEntryVisibility . Public } ) ;
292
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Out-Host" , typeof ( OutHostCommand ) , null ) ) ;
293
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Import-Module" , typeof ( ImportModuleCommand ) , null ) ) ;
294
- iss . Commands . Add ( new SessionStateCmdletEntry ( "Start-EditorServices" , typeof ( PSCommand ) , null ) ) ;
295
-
296
- return iss ;
297
- }
273
+
298
274
/// <summary>
299
275
///
300
276
/// </summary>
0 commit comments