Skip to content
PowerShell Cmdlets and .Net Libraries for Google Apps and Gmail APIs
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
gShell Cleaned up code slightly and fixed some issues, including issue #58 -… Oct 19, 2017
.gitignore checking in format and manifest files. Feb 3, 2017
LICENSE Create LICENSE Sep 9, 2014 Updated readme for 0.10.0 beta release Dec 28, 2016

Welcome to gShell!

PowerShell Cmdlets for G Suite Administration

gShell is a toolset to help you access and manage information from your G Suite (formerly Google Apps) domain through Windows PowerShell. (Need some help with the basics?) Simply put, gShell is a native PowerShell wrapper for the APIs that make up the Google Admin SDK.

What's New?

Version 0.10 beta is now available! With 50 new cmdlets added, you can't go wrong! This is the final major update to gShell. Check out the News page for more, or dive in to the comprehensive wiki!

Check out the Getting Started page to get going, or hop over to Downloads if you want to dive in with the installer.

Quick Examples

The idea of gShell is to allow you quick and easy access to your G Suite domain. Check out some of the following examples to see how this can be helpful to you, once you get past the quick setup.

PS C:\> Get-GAUser BMcGee

GivenName     : Bobby
FamilyName    : McGee
PrimaryEmail  :
Aliases       : {,}
Suspended     : False
OrgUnitPath   : /
LastLoginTime : 2013-10-25T05:10:40.000Z
  • Get all users in the domain as a variable:
PS C:\> $AllUsers = Get-GAUser -all

PS C:\> $AllUsers.Count

PS C:\> $Members = Get-GAGroupMember SomeGroupName

PS C:\> $Members.Count

  • Export members of all groups in to a CSV:
PS C:\> $AllMembers = New-Object System.Collections.ArrayList

foreach ($Group in (Get-GAGroup -All)) {
    if ($Group.DirectMembersCount -gt 0) {
        $Members = Get-GAGroupMember $Group.Email

        foreach ($Member in $Members) {
            $Member | Add-Member -NotePropertyName "Group" -NotePropertyValue $Group.Email
            $AllMembers.Add($Member) | Out-Null

PS C:\> $AllMembers[0]

Group :
Email :
ETag  : ""
Id    : 123456789123456789123
Kind  : admin#directory#member
Role  : MEMBER
Type  : USER

PS C:\> $AllMembers | Export-Csv -Path "C:\AllGroupMemberships.csv" -NoTypeInformation

PS C:\> (Get-Content "C:\AllGroupMemberships.csv")[0..1]
#Let's look directly at the CSV file...


This is the tip of the iceberg of what's possible and what's available. If you need help or have questions, drop a line in the discussion group.

Alternately, please file bugs and issues in the issue tracker.

You can’t perform that action at this time.