Skip to content

Instantly share code, notes, and snippets.

@gosoxharp
gosoxharp / GDrive.Upload.ps1
Created July 29, 2022 15:00 — forked from ConnorGriffin/GDrive.Upload.ps1
GDrive Upload PowerShell Script
# Set the Google Auth parameters. Fill in your RefreshToken, ClientID, and ClientSecret
$params = @{
Uri = 'https://accounts.google.com/o/oauth2/token'
Body = @(
"refresh_token=$RefreshToken", # Replace $RefreshToken with your refresh token
"client_id=$ClientID", # Replace $ClientID with your client ID
"client_secret=$ClientSecret", # Replace $ClientSecret with your client secret
"grant_type=refresh_token"
) -join '&'
Method = 'Post'