Windows

Below is an expanded Windows-specific Installation section, complete with common pitfalls and their fixes. Drop this into your README under Installation.

Installation on Windows (PowerShell)

Tested on Windows 10/11 (64-bit) with PowerShell 7.x or higher. Requires Administrator rights for system-wide installs and changes to execution policy.


1. Prerequisites

  • Windows 10/11, 64-bit

  • PowerShell 7+ (install/update via GitHub releases)

  • Internet access (for downloads)


2. Install Node.js (v22+) & npm

A. Official Installer

  1. Download the Windows x64 MSI for Node.js v22.x.x (LTS) https://nodejs.org/en/download/

  2. Right-click → Run as Administrator.

  3. Accept defaults on each screen (ensures node & npm are added to your PATH).

B. Verify Versions

node --version   # should be v22.x.x or higher
npm --version

3. (Optional) nvm-for-Windows

If you need multiple Node versions side by side:

  1. Unzip & run nvm-setup.exe as Administrator.

  2. Open a new PowerShell session, then:

    nvm install 22.24.0
    nvm use 22.24.0
    node --version   # now v22.24.0

4. PowerShell Execution Policy & Remote Blocked Files

Issue: “scripts cannot be loaded because running scripts is disabled on this system,” or downloaded .ps1 flagged as “blocked.”

  1. Allow local & signed scripts only (recommended):

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
  2. If you’ve downloaded .ps1 or .msi installers that PowerShell won’t run, unblock them:

    Get-ChildItem .\path\to\downloads\* -Recurse |
      Unblock-File

5. Install the P0 CLI

npm install -g @p0security/cli

If you see permissions errors:

  • Ensure PowerShell is “Run as Administrator.”

  • Or use a per-user install:

npm install --location=global @p0security/cli


#### Verify

```powershell
p0 --version
p0 help

6. AWS CLI & Session Manager Plugin (for p0 aws & p0 ssh)

  1. AWS CLI v2

  2. Session Manager Plugin


7. Proxy & Corporate Firewall Issues

Issue: npm install times out, or p0 login can’t reach your org.

  • Set npm proxy:

    npm config set proxy http://proxy.company.com:8080
    npm config set https-proxy http://proxy.company.com:8080
  • Environment vars:

    [Environment]::SetEnvironmentVariable('HTTP_PROXY','http://proxy.company.com:8080','User')
    [Environment]::SetEnvironmentVariable('HTTPS_PROXY','http://proxy.company.com:8080','User')

8. Troubleshooting & Tips

Symptom
Cause / Fix

p0: command not found

- Restart PowerShell (to pick up new PATH).- Check %USERPROFILE%\AppData\Roaming\npm.

Error: EACCES permissions denied

- Run PowerShell as Administrator.- Try --location=global for npm.

Set-ExecutionPolicy still blocked on corporate PC

- Check with IT: some shops lock policy via Group Policy (GPO).

session-manager-plugin not recognized

- Ensure AWS CLI folder is on PATH.- Reopen PowerShell.

p0 login never opens browser

- Set $env:AZURE_AUTH_METHOD = 'browser' for certain orgs that disable embedded webviews.


You’re all set! Next up: Configurationp0 login <YOUR_ORG_ID> and start requesting access.

Last updated