Skip to content
GVM for Powershell
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead of chris-dalrymple:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This repository is a folk fron flofreud/posh-gvm and merged a pull request Updates to work with sdkman API v2 #34.

Considering that I'm not delivering software anymore on a maschine running Windows since early 2016 I'm not using posh-gvm anymore. It seems like it's mostly still working but clearly an active maintainer would be helpful. It's so old that the orginial projects was renamed and did grow quiet a bit over the functionality provided for Powershell. If anyone wants to pick up...

posh-gvm - the POwerSHell Groovy enVironment Manager

Posh-GVM is a clone of the GVM CLI. In most aspects its an 1:1 copy of the BASH based version.

For further information about the features of GVM please the documentation on the GVM Project Page.

Posh-GVM consumes the REST-API of the offical GVM CLI and may therefore break if the API will be changed in future.

Please report any bugs and feature request on the GitHub Issue Tracker.

ATTENTION - Always offline and selfupdate Issue

Recently the used url for the API endpoint got drop so that the posh-gvm thinks there is always a connection issue. The newest available version uses the new API endpoint but due to the expected connection issue the update has to be done manually.

Please update the posh-gvm client using your favorite method. PsGet users also could use Update-Module posh-gvm.

Differences to the BASH version

  • different directory used as default ~.posh-gvm instead of ~.gvm -> posh-gvm is not directly able to manage the .gvm-dir of GVM
  • command extension are not supported
  • different way to configurate data-dir and auto-anwser
  • not all installable candidates are useful currently in Powershell (eg the groovyserv 0.13 package is not usable because there is no client app/script in the package)


You have multiple choices for installation of posh-gvm:


  • Powershell 3.0+ (included in Windows 8+/Windows Server 2012+, for Windows 7 install Windows Management Framework 3.0)

With PsGet(outdated)

  1. Execute Install-Module posh-gvm
  2. Execute Import-Module posh-gvm(best add it to your profile.ps1)
  3. Execute gvm help to get started!

Via short script

  1. Execute (new-object Net.WebClient).DownloadString('') | iex
  2. Execute Import-Module posh-gvm(best add it to your profile.ps1)
  3. Execute gvm help to get started!

Classic way

  1. Checkout this repository to your Powershell module-directory.
  2. Execute Import-Module posh-gvm(best add it to your profile.ps1)
  3. Execute gvm help to get started!


Newer versions of posh-gvm will notify you about new versions which can be installed by gvm selfupdate. If gvm version does not show a version of posh-gvm you have to update manually.

How to get a update of posh-gvm manually ?

How to update depends on how you installed posh-gvm:

With PsGet

Update-Module posh-gvm

Via short Script

(new-object Net.WebClient).DownloadString('') | iex

Classic way

Go to the checkout location and pull the repository.


For a general overview of the feature please the GVM Project Page because posh-gvm is designed to work like the original BASH client. Just replace sdkman for gvm and you'll have access to all the commands that you see in in the (GVM Tool homepage, now called sdkman)[].

Add Import-Module posh-gvm to your powershell profile to be able to use it after each start of Powershell. If you do not know where your profile is located, execute $Global:profile.


By default posh-gvm put all the data (inclusive the to be installed executables) into ~/.posh_gvm. You can change the location by setting:

$Global:PGVM_DIR = <path>

n your profile BEFORE the Import-Module posh-gvm line.

Similar to the BASH client you can configure posh-gvm to automatically set new installed versions as default version. You do this by adding:

$Global:PGVM_AUTO_ANSWER = $true

in your profile.


Replace sdkman for gvm and you'll have access to all the commands that you see in in the (GVM Tool homepage, now called sdkman)[]


If you want to remove posh-gvm you need to perform 3 steps:

  1. Remove the Import-Module posh-gvm statement from your powershell profile (The path can be found with PS> $PROFILE).
  2. Remove the posh-gvm folder from you powershell modules (Most likely posh-gvm is in the first path of PS> $env:PSModulePath).
  3. Remove the ~\posh_gvm folder in your home folder.

If you now restart your powershell instance, posh-gvm is gone.


Q: Error "File xxx cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details."

A: By default, PowerShell restricts execution of all scripts. This is all about security. To "fix" this run PowerShell as Administrator and call

Set-ExecutionPolicy RemoteSigned

Running the Pester Tests

All posh-gvm test are written for Pester. Please see its documentation:

To run the tests in Powershell, load the Pester module and run in posh-gvm dir:

$ Invoke-Pester
You can’t perform that action at this time.