This PowerShell module contains commands to manage GitHub through its REST API.
Switch branches/tags
Nothing to show
Clone or download
Latest commit b004ac0 Jun 20, 2018


powershellgallery downloads build chat

PowerShell module with commands to query and manage GitHub through its REST API.


You can install the PSGitHub PowerShell module using one of the following methods.

  1. Install from the PowerShell Gallery (requires PowerShell 5.0+)
    Install-Module PSGitHub
  2. Copy-install the module to your $env:PSModulePath
  3. Extract the module anywhere on the filesystem, and import it explicitly, using Import-Module


To access private repositories, make changes and have a higher rate limit, create a GitHub token. This token can be provided to all PSGitHub functions as a SecureString through the -Token parameter. You can set a default token to be used by changing $PSDefaultParameterValues in your profile.ps1:

On Windows

$PSDefaultParameterValues['*GitHub*:Token'] = 'YOUR_ENCRYPTED_TOKEN' | ConvertTo-SecureString

To get the value for YOUR_ENCRYPTED_TOKEN, run Read-Host -AsSecureString | ConvertFrom-SecureString once and paste in your token.

On macOS/Linux

macOS and Linux do not have access to the Windows Data Protection API, so they cannot use ConvertFrom-SecureString to generate an encrypted plaintext version of the token without a custom encryption key.

If you are not concerned about storing the token in plain text in the profile.ps1, you can set it like this:

$PSDefaultParameterValues['*GitHub*:Token'] = 'YOUR_PLAINTEXT_TOKEN' | ConvertTo-SecureString -AsPlainText -Force

Alternatively, you could store the token in a password manager or the Keychain, then retrieve it in your profile and set it the same way.


Please report issues in the GitHub Issue Tracker.


This module was originally developed by Trevor Sullivan. You can contact Trevor using one of the following methods:

Core Contributors