@@ -18,9 +18,9 @@ This RFC addresses the experience for the user when using PowerShell Core 6.1 wi
18
18
19
19
## Motivation
20
20
21
- As a ITPro,
22
- I can use existing Windows PowerShell modules in PowerShell Core 6,
23
- so that I can start deploying PowerShell Core 6 in my enterprise.
21
+ As an ITPro,
22
+ I can use existing Windows PowerShell modules in PowerShell Core 6,
23
+ so that I can deploy PowerShell Core 6 in my enterprise.
24
24
25
25
## Specification
26
26
@@ -40,27 +40,29 @@ Windows PowerShell, by default, has module paths in:
40
40
The proposed change is to add * only* the ` System32 ` path to ` PSModulePath ` on PowerShell Core 6.
41
41
42
42
Modules in the user profile should be re-installed under PowerShell Core 6.
43
- Duplicate modules is something that can be addressed in PowerShellGet and outside the scope of this RFC.
43
+ Duplicate modules are something that can be addressed in PowerShellGet and outside the scope of this RFC.
44
44
Modules in ` Program Files ` that may be compatible with PowerShell Core 6 is addressed below.
45
45
46
- Users who want to search the entirety of the Windows PowerShell PSModulePath should use ` Add-WindowsPSModulePath ` cmdlet
46
+ Users who want to search the entirety of the Windows PowerShell ` PSModulePath ` should use ` Add-WindowsPSModulePath ` cmdlet
47
47
from the ` WindowsCompatibility ` module.
48
48
49
49
### PowerShell Core PSModulePath
50
50
51
- Modules in the PowerShell Core PSModulePaths are implicitly deemed compatible even if the manifest does not
51
+ Modules in the PowerShell Core ` PSModulePath ` are implicitly deemed compatible even if the manifest does not
52
52
declare compatibility.
53
- A user would have explicitly used ` Install-Module ` within PowerShell Core 6 for those modules to be in the
54
- PowerShell Core 6 module path with expectation those modules are available.
53
+ A user who explicitly uses ` Install-Module ` within PowerShell Core 6 for those modules expect them to be available to PowerShell Core 6.
55
54
56
- ### CompatiblePSEditions
55
+ ### CompatiblePSEditions for system32
56
+
57
+ When we add the ` system32 ` path to PowerShell Core's ` PSModulePath ` ,
58
+ we will use additional logic to validate that the module is compatible with PowerShell Core.
57
59
58
60
If the module manifest contains ` CompatiblePSEditions ` with value ` Core ` , then that module is treated as compatible.
59
61
If the module manifest contains ` CompatiblePSEditions ` with only the value of ` Desktop ` , then that module is treated as incompatible.
60
62
If the module manifest does not contain ` CompatiblePSEditions ` , then that module is treated the same as ` Desktop ` which is incompatible.
61
63
62
64
By default, ` Get-Module -ListAvailable ` will only show modules found in ` PSModulePath ` that are declared as compatible.
63
- Similarly, module auto-discovery will only find modules that are declared as compatible.
65
+ Similarly, module auto-discovery and auto-loading will only find modules that are declared as compatible.
64
66
65
67
The ` ModuleInfo ` table format will add a column for ` CompatiblePSEditions ` (between ` Name ` and ` ExportedCommands ` ).
66
68
0 commit comments