PS5 implicit remoting#1334
Conversation
does not support auto-loading of nested modules, so we need to explicitly import the required nested modules for AIPService with -UseWindowsPowerShell to ensure they are loaded in the WinPS5 session, even when Connect-ZtAssessment is run from PS7.
There was a problem hiding this comment.
Pull request overview
This PR updates Connect-ZtAssessment’s Azure Information Protection (AipService) module-loading logic to make Windows PowerShell 5.1 implicit remoting more reliable when the AipService module is installed outside the Windows PowerShell module path (e.g., under the PowerShell 7 module locations).
Changes:
- Import the AipService module via its resolved manifest file path (
$_.Path) rather than piping the module object toImport-Module. - Add inline rationale explaining why a full manifest path is required for WinPS5 implicit remoting in this scenario.
|
@rberghuis Have you experienced an error? |
|
@alexandair yes, I could load the module itself but populated the below error when trying to do implicit remoting With this fix, it seems to be resolved. Trial-and-error, which is the reason I load the module locally. |
|
@alexandair for reference, this is a sanitized transcript |
|
I need to investigate why it fails for
Out of curiosity, why did you install AIPService to PS7 module path when it's not supported to run directly in PS7? Did you run ZTA-related commands in a fresh PowerShell session? |
PS5 implicit remoting does not support auto-loading of nested modules, so we need to explicitly import the required nested modules for AIPService with -UseWindowsPowerShell to ensure they are loaded in the WinPS5 session, as Connect-ZtAssessment is run from PS7.