Giter Club home page Giter Club logo

gshell's Introduction

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  : bmcgee@mydomain.com
Aliases       : {bobbymcgee@mydomain.com, bobmcgee@mydomain.com}
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

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

----
PS C:\> $Members.Count

42
  • 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 : songcharacters@mydomain.com
Email : bobbymcgee@mydomain.com
ETag  : "01...rs/44...HQ"
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...

"Group","Email","ETag","Id","Kind","Role","Status","Type"
"[email protected]","[email protected]",
"""01...rs/44...HQ""","12...23","admin#directory#member","MEMBER","USER"

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.

gshell's People

Contributors

bryant1410 avatar countingtoten avatar squid808 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.