Skip to content

[BUG] install error in windows terminal with powershell7 #106

@hllshiro

Description

@hllshiro

Description

Install failed with error:

Get-ExecutionPolicy : The 'Get-ExecutionPolicy' command was found in the module 'Microsoft.PowerShell.Security', but th
e module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.
At D:\Service\pm2\src\windows\configure-policy.ps1:7 char:11
+ $policy = Get-ExecutionPolicy -Scope CurrentUser
+           ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ExecutionPolicy:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Steps to Reproduce

  1. run wt.exe with administrator
  2. run npm run setup

Environment

windows11
wt.exe(windows terminal)
powershell

// npm run info

❯ npm run info

> [email protected] info
> node ./src/bundle-info/current.js

Running on: 2025/10/23, pm2-installer 3.4.3 with node v22.19.0 and npm 10.9.3 on win32-10.0.22631.

After switching to the old version of PowerShell, it succeeded...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions