Add WinCompat deny list support using a setting in powershell.config.json#11726
Add WinCompat deny list support using a setting in powershell.config.json#11726TravisEz13 merged 10 commits intoPowerShell:masterfrom
Conversation
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
|
Is this needed for GA? |
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
|
@PoshChan Please remind me in 1 day |
|
|
|
@PaulHigin Can you update your review? |
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
|
Please resolve conflicts |
|
@TravisEz13, this is the reminder you requested 1 day ago |
|
My earlier comment may have gotten buried - the WSUS module should be added to the WInCompat deny list. |
SteveL-MSFT
left a comment
There was a problem hiding this comment.
Pending adding UpdateServices module to the list
…/PowerShell into WinCompatModuleDenyList
|
@SteveL-MSFT Please update your review? |
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@PoshChan Please remind me in 1 hour |
test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@TravisEz13, this is the reminder you requested 1 hour ago |
|
@PoshChan Please remind me in 1 hour |
|
@TravisEz13, this is the reminder you requested 1 hour ago |
…rShell#11726) # Conflicts: # build.psm1 # src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
|
🎉 Handy links: |
PR Summary
Some Windows PowerShell modules don't work well with de/serialized objects, so they can not be used with WinCompat.
This PR adds support for an optional
WindowsPowerShellCompatibilityModuleDenyListsetting (a string array) inpowershell.config.jsonso that a user can prevent specified modules from being loaded using WinCompat.If WinCompat feature is enabled and it tries to load a module mentioned in the DenyList, then an error is generated.
Module name comparison is case-insensitive.
By default, in PowerShell packages for Windows OS, this setting will contain
PSScheduledJob,BestPracticesandUpdateServicesmodules (this list most likely will be extended in future).Fix #11687
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.