Arthur Posted October 16, 2016 Posted October 16, 2016 Website / Download / Cmdlet Index / Getting Started Guide / What's New PowerShell Cmdlets for Google APIs gShell is a toolset to help you access and manage information from your Google Apps domain through Windows PowerShell. Check out the Getting Started page to get going, or hop over to Downloads if you want to dive in with the installer. Please keep an eye on the documentation here in the Wiki for what is available; this is a work in progress done in my spare time so things are added irregularly but as frequently as possible. Finally, I'm always open to adding something new, so if you have an idea let me know! Alternately, please file bugs and issues in the issue tracker. Quick Examples The idea of gShell is to allow you quick and easy access to your Google Apps domain. Check out some of the following examples to see how this can be helpful to you, once you get past the quick setup. First, you can grab a user from your domain and get it back as a GAUser object: PS C:\> Get-GAUser BMcGee mydomain.com GivenName : Bobby FamilyName : McGee PrimaryEmail : [email protected] Aliases : {[email protected], [email protected]} Suspended : False OrgUnitPath : / LastLoginTime : 2013-10-25T05:10:40.000Z Or, you can elect to get all users in the domain and throw them in a variable, perhaps to compare against your AD Environment: PS C:\> $AllUsers = Get-GAUser -all ---- PS C:\> $AllUsers.Count 9001 Better yet, perhaps you need to get a list of all users in all groups in the domain... PS C:\> $AllGroups = Get-GAGroup mydomain.com -All -Members -Owners #A progress bar will show up for this, since it's potentially a long wait ---- PS C:\> $AllGroups.Count 42 ...or you want to find all members of all groups, and throw that in a list for easy export to CSV Got that covered: PS C:\> $AllMembers = (Get-GAGroupMember -All).ToSingleList() ---- PS C:\> $AllMembers[0] Email : [email protected] ETag : "01...rs/44...HQ" Id : 123456789123456789123 Kind : admin#directory#member Role : MEMBER Type : USER Group : [email protected] ---- PS C:\> $AllMembers | Export-Csv -Path "C:\AllGroupMemberships.csv" -NoTypeInformation ---- PS C:\> (Get-Content "C:\AllDomainGroupMemberships.csv")[0..1] #Let's look directly at the CSV file... "Email","ETag","Id","Kind","Role","Type","Group" ,"""01...rs/44...HQ""","12...23","admin#directory#member","MEMBER","USER" ,"[email protected]" This is the tip of the iceberg of what's possible and what's available. 1
rogerdnixon Posted October 16, 2016 Posted October 16, 2016 Nice idea - but what can it do that GAM does not already do? GAM is pretty fully featured and well documented + has easier to use syntax (unless you are a Powershell guru I guess).
Arthur Posted October 17, 2016 Author Posted October 17, 2016 Nice idea - but what can it do that GAM does not already do? With gShell you can take advantage of the PowerShell pipeline rather than mess around with CSV files e.g. Get-ADUser -Filter * -SearchBase "OU=Students,OU=Users,DC=example,DC=com" |
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now