You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.
Not sure this title could be understand ^^
My issue : in PWSH constraint language mode, the import of ps1 files in forbidden.
So it's more a feature request than an issue : could you replace the call of autonomous ps1 files in the psd1 by a psm1 submodule that load the ps1 files ?
Thank you,
Kind regards,
Lucas Cueff
The text was updated successfully, but these errors were encountered:
This is only one of several reasons this module will not currently work in constrained language mode. There is significant work required to support that.
Hello, thanks for your feedback.
From my point of view the work is not so huge because your code signing should cover 90 % of the constraint language mode limitations (forbidden type and so one). So the work is focused mainly on 3 files : the PSD1 to avoid any dot source call, the PSM1 to load all ps1 files as dot sourced files and export all function names based on function names imported. On my side, I have done a quick and dirty fix to test it and it is working well :
create a new module with your current psm1 file modified to import all ps1 from msal.ps source directory + your current psm1 code adapted (for path reason mainly) ==> I use also AST to get back dynamically the function names used in each ps1 file to export them automatically using Export-ModuleMember
create a new psd1 linked to this module without any dot source prerequisites
forked the main ps1 file mainly to fix path issue
sign the three files
==> all is working fine with PowerShell constraint language mode enabled and several other applocker enforcement.
Alright, I'll leave this open. I do want to add a step in our publishing pipeline to combine everything into a single .psm1 file it just hasn't been a priority.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
Not sure this title could be understand ^^
My issue : in PWSH constraint language mode, the import of ps1 files in forbidden.
So it's more a feature request than an issue : could you replace the call of autonomous ps1 files in the psd1 by a psm1 submodule that load the ps1 files ?
Thank you,
Kind regards,
Lucas Cueff
The text was updated successfully, but these errors were encountered: