mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Merge pull request #1661 from PowerShell/dongbo/get-pssession
Fix if/def guards to allow engine to load WsMan and Diagnostics snapins by default when RunspaceConfiguration is used to create a runspace
This commit is contained in:
commit
9a0436b856
2 files changed
+11
-2
No files matched your search
@@ -1284,7 +1284,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
s_defaultMshSnapins = new List<DefaultPSSnapInInformation>()
|
||||
{
|
||||
#if !PORTABLE // Microsoft.PowerShell.Commands.Diagnostics.dll needs to be ported
|
||||
#if !UNIX
|
||||
new DefaultPSSnapInInformation("Microsoft.PowerShell.Diagnostics", "Microsoft.PowerShell.Commands.Diagnostics", null,
|
||||
"GetEventResources,Description", "GetEventResources,Vendor"),
|
||||
#endif
|
||||
@@ -1303,7 +1303,7 @@ namespace System.Management.Automation
|
||||
"SecurityMshSnapInResources,Description","SecurityMshSnapInResources,Vendor")
|
||||
};
|
||||
|
||||
#if !PORTABLE
|
||||
#if !UNIX
|
||||
if (!Utils.IsWinPEHost())
|
||||
{
|
||||
s_defaultMshSnapins.Add(new DefaultPSSnapInInformation("Microsoft.WSMan.Management", "Microsoft.WSMan.Management", null,
|
||||
|
||||
Reference in new issue
Block a user