79089322

Date: 2024-10-15 09:33:53
Score: 1
Natty:
Report link

I also faced this issue and the workaround i found was to copy the modules needed from where they are installed to the path indicated in the PSModulePath for the user used by ssm document.

  1. See where module is installed

    Get-Module -ListAvailable -Name "{module_name}" | Select-Object Name, Version, Path

  2. See the value for PSModulePath

    Write-Output $Env:PSModulePath

  3. Copy the module for the installed path to the PSModulePath

    Copy-Item -Path "{installed_path}" -Destination "{ps_module_path}" -Recurse

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Taniamp