Skip to content

Set GShellClientSecrets

Spencer Varney edited this page Dec 9, 2016 · 2 revisions

Set-GShellClientSecrets

SYNOPSIS

Set or update the client secrets used by gShell.

SYNTAX

Set-GShellClientSecrets [-ClientId] <String> [-ClientSecret] <String> [-WhatIf] [-Confirm]

DESCRIPTION

Set or update the client secrets used by gShell. Before you can use gShell, you must create your own project in the Google Developers Console and get a Client ID and Secret. This allows you to tell Google which APIs you will be using with gShell, and allows them to keep track of your quotas. If you're unsure of how to proceed, please see a brief description below: Step 1) Create a new project. Name it something that makes sense to you, like 'gShell Toolkit for My Domain'. Step 2) Choose and enable which APIs you'd like to access. If you don't enable an API here, gShell won't be able to access that API on your behalf. Step 3) Create new credentials. On step 6, choose 'Other' as the Application Type. Following the above steps provides you with a Client ID and Secret, which you can save for use in gShell by using this Cmdlet.

EXAMPLES

---------- EXAMPLE 1 ----------

PS C:\> Set-gShellClientSecrets -ClientId "sfalskdhflaksdf23234-adsfpkasdgalskjdf.apps.googleusercontent.com" -ClientSecret "a235fbdosidhf3f8dSDfwefo"

The clientID and clientSecret in this example are gibberish used for the sake of the example.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

PARAMETERS

-ClientId

The ClientID provided in the project's APIs & auth section in the Google Developer's Console.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-ClientSecret

The ClientSecret provided in the project's APIs & auth section in the Google Developer's Console.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 1
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

OUTPUTS

NOTES

Part of the gShell Project, relating to the Google Drive API; see Related Links or use the -Online parameter.

RELATED LINKS

[Wiki page for this Cmdlet]

[Getting started with gShell]

[The Google Developer's Console]

[Create, shut down, and restore projects]

[Enable and disable APIs]

[Setting Up Oauth 2.0]

Clone this wiki locally