Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feedback] What additional Google API's would YOU like to see added to PSGSuite? #16

Closed
5 of 9 tasks
scrthq opened this issue Feb 8, 2018 · 52 comments
Closed
5 of 9 tasks

Comments

@scrthq
Copy link
Member

scrthq commented Feb 8, 2018

PSGSuite was originally created for personal and work-related automation, so functions were created somewhat sporadically without 100% coverage of each API in scope. For most, the functions available should cover what's needed, but I'd like to increase the coverage as much as possible!

Please leave a comment with any Google APIs/endpoints* you would like to see added into PSGSuite! If you have a link to Google's documentation page for that API, that would be appreciated as well to remove any possible confusion.

*At the moment, this is going to be somewhat limited to APIs outside of Google Cloud Platform, but if the demand is there, I'm open to digging into GCP API's like Vision API and the like.

Looking forward!

  • Nate

Progress Checklist

  • Gmail Settings (IMAP, POP, Auto Forwarding, Vacation) [Added in v2.2.0]
  • CalendarSubscription management [Added in v2.3.0]
  • User Aliases [Added in v2.3.0]
  • Group Aliases [Added in v2.3.0]
  • Update User's Schema values [Added in v2.5.0]
  • Contact Management: Issue #53
  • SuperAdmin & Admin Role management: Issue #54
  • Updating Drive files: Issue #55
  • Updating Google Docs like local text files (Out-File/Set-Content parity): Issue #56

Waffle.io - Columns and their card count

@scrthq scrthq added the question label Feb 8, 2018
@scrthq scrthq self-assigned this Feb 8, 2018
@ryanfog
Copy link

ryanfog commented Mar 15, 2018

How about IMAP settings to see what users are enabled? In addition, what OU's have IMAP disabled.

@scrthq
Copy link
Member Author

scrthq commented Mar 15, 2018

@ryanfog - Getting the OU level settings for services like Gmail isn't possible at the moment via API that I'm aware of (please send any API links you have otherwise so I can check them out, it would be awesome if doable!), but pulling individual users' Gmail settings is definitely doable 👍

@scrthq
Copy link
Member Author

scrthq commented Mar 17, 2018

@ryanfog - IMAP, POP, AutoForwarding and Vacation settings all added in v2.2.0! Included functions to both Get settings and Update settings for all.

@ryanfog
Copy link

ryanfog commented Mar 18, 2018

Nate are you in active development on this module? I prefer your module over GAM since the output is an actual PowerShell object that I can then do other things with compared to GAM's massive string output.
If you are active on this module I would like to submit additional functionality and be willing to test out those functions to fully remove GAM for my ongoing management of GSuite.

@scrthq
Copy link
Member Author

scrthq commented Mar 18, 2018

@ryanfog yup!I took a break from this module for a while, but have been pretty active with it again since starting work on v2.0.0+. You can check the code-frequency graph to see activity. I'll work on getting an official contributing guide written up! All help is appreciated, I'd love to see full Google API coverage (at least for G Suite related API's) at some point if possible! Wanting a better experience in PowerShell than GAM provides was my initial motivation for writing this module in the first place, I totally get your pains with GAM + PowerShell!

@ryanfog
Copy link

ryanfog commented Mar 19, 2018

Quick question being a former Exchange admin now managing Google. We have the option to create contacts in Exchange. Does Google have that ability to create contacts in the Global Directory? If so can you add this feature?

@scrthq
Copy link
Member Author

scrthq commented Mar 19, 2018

@ryanfog I want to say yes (I know it does for individual users). Checking it out!

@scrthq
Copy link
Member Author

scrthq commented Mar 20, 2018

@ryanfog alright, so the Contacts API is part of the Google Data API's, which are all either deprecated or the libraries are no longer maintained. The GData .NET library hasn't been updated in almost 5 years and doesn't use the same auth Service mechanisms that their current API's (and PSGSuite) use, so it's going to take a bit of work to get working if even possible.

There is also the Domain Shared Contacts API, but that's also part of the GData API structure from what I can tell with no available assembly to load in.

I will see what I can do about possibly going the route that I took for PSGSuite v1.x.x using the Owin libraries to build an auth token and send API calls via Invoke-RestMethod instead. Updates to follow, but it won't be as quick a turnaround as it was for the Gmail Settings.

@scrthq
Copy link
Member Author

scrthq commented Mar 20, 2018

@ryanfog Here's a different option already available as a PowerShell module from CData, in case you have something immediate to handle!

https://www.powershellgallery.com/packages/GoogleContactsCmdlets/

@jboiselle
Copy link

Hey Nate, would it be possible to get cmdlets to remove or disable email forwarding in Gmail? Update-GSGmailAutoForwardingSettings doesn't appear to let you disable forwarding.

@scrthq
Copy link
Member Author

scrthq commented Mar 28, 2018

@jboiselle hey Josh! The parameters for the functions in PSGSuite are typically matched to the Body object parameters the SDK expects (Body object being an AutoForwardingSettings object in this case). Because of this, the parameters may not be quite as expected, but worth keeping in mind that switch parameters like the -Enabled parameter on Update-GSGmailAutoForwardingSettings can be negated by flagging as $false. Here is how you would disable auto-forwarding with PSGSuite, let me know if you have any issues with it!

Update-GSGmailAutoForwardingSettings -Enabled:$false

@scrthq
Copy link
Member Author

scrthq commented Mar 28, 2018

@jboiselle - FYI, found an issue with the scope in use for that specific function (#25). Fix is complete and tested and being deployed to PowerShell Gallery as v2.2.1 as we speak though!

@scrthq
Copy link
Member Author

scrthq commented Mar 28, 2018

@jboiselle fixed in v2.2.1!

Example of setting and disabling autoforwarding:

image

@ryanfog
Copy link

ryanfog commented Apr 2, 2018

I have another request, I would like a way to subscribe a user to a calendar resource.

The GAM version appears to be this.
GAM User $($user.UserMailbox) Add Calendar $($user.CalendarEmail) Selected true

Thanks,

@scrthq
Copy link
Member Author

scrthq commented Apr 2, 2018

@ryanfog you got it! Adding calendars is a no brainer, I'm on it!

@ryanfog
Copy link

ryanfog commented Apr 5, 2018

I am sure you are getting sick of my requests but what about adding an Alias into Google. Does that exist already and I was unable to find it?

@scrthq
Copy link
Member Author

scrthq commented Apr 6, 2018

@ryanfog haha no worries at all, that's why I have this post up!

User and group aliases are both doable. Adding them to the list!

FYI - I'm in the process of prepping for a move right now, so my availability is a little slimmer than usual! Apologies for any delays in additional functionality! Pull requests are always accepted if you're feeling adventurous!

@scrthq
Copy link
Member Author

scrthq commented Apr 9, 2018

@ryanfog - CalendarSubscription, Group Alias and User Alias management functions added in v2.3.0! Update when you can and you should see them there!

Thanks for the suggestions, let me know how they work for you!

@jboiselle
Copy link

Hey Nate, what about modifying custom schema attributes on users? As far as I can tell, the tools to create and modify the schemas are already here, but there does not appear to be a way to set/modify custom attributes on individual users (please correct me if I'm wrong). It looks like this is done through the Users 'patch' method in the API?

@scrthq
Copy link
Member Author

scrthq commented Apr 11, 2018

@jboiselle I thought I'd had schema updating built-in with Update-GSUser, but checked again and you're right!

The Patch method is being phased out in favor of the Update method (same functionality, but better performance), but the example the Developer docs give does use Patch.

I'll work on adding it into Update-GSUser ASAP! It will likely accept a hashtable as the argument, i.e. something like this (using Google's schema as an example here):

Update-GSUser -User test -Schema @{
    employmentData = @{
        employeeNumber = "123456789"
        jobFamily      = "Engineering"
        location       = "Atlanta"
        jobLevel       = 8
        projects       = @(
            @{ value = "GeneGnome" },
            @{ value = "Panopticon"; type = "work" },
            @{ value = "MegaGene"; type = "custom"; customType = "secret" }
        )
    }
}

@ryanfog
Copy link

ryanfog commented Apr 11, 2018

One of the things I enjoyed with Exchange operations was doing something like Get-Mailbox - ResultSize 25, this would bring me back a random list of 25 mailboxes. If I did something like Get-Mailbox -All I would pull back all mailboxes.

I was thinking I could run something like Get-GSUser and get everyone, but that just brings back myself. There are other commands I would like to do on a global level without doing them per user as well. Does Google have the option to pull all the users in one request, I want to be cautious of hitting any throttle limits.

@scrthq
Copy link
Member Author

scrthq commented Apr 12, 2018

@ryanfog - I designed Get-GSUser to have as much parity with Get-ADUser as possible, so if you're looking to pull the user list, just run Get-GSUser -Filter * 😄. Get-GSUser does have a PageSize parameter in that parameter set, but the default will still pull all pages. We have about 9000 user objects in our org and it takes just under 1 minute to pull them all for me. Let me know if you feel getting a limited selection of those back is useful and I'll try to work it in as a ResultsSize or MaxResults parameter!

@ryanfog
Copy link

ryanfog commented Apr 16, 2018

Nate,

In my environment which is slightly more users then yours I get this error message.

capture

@scrthq
Copy link
Member Author

scrthq commented Apr 16, 2018 via email

@cooper
Copy link

cooper commented Apr 23, 2018

I second interest in adding values for custom user schema!

@cooper
Copy link

cooper commented Apr 23, 2018

Also, will it be possible to query users by custom schema? I want to use an employee identifier for account syncing purposes, but I have to use custom schema because it needs to remain private to domain admins.

@scrthq
Copy link
Member Author

scrthq commented Apr 25, 2018

@cooper - You can query by custom schema value, just follow the Users Search syntax here: https://developers.google.com/admin-sdk/directory/v1/guides/search-users

Example using PSGSuite to do this with the assumption that you have a schema named "ExtraDetails" and a field in that Schema named "Location" and you are searching for users with 'Sydney' as the location:

Get-GSUser -Filter "ExtraDetails.Location='Sydney'"

@scrthq
Copy link
Member Author

scrthq commented Apr 27, 2018

@NFLEagles1 - That's awesome to hear! Probably the easiest way to submit your additions would be to send it as a pull request here; that will allow me to review what's there and offer pertinent feedback, then merge those changes into a new release with any adjustments as necessary. I can take care of updating the Wiki once merged (I have a script that regenerates the Help Docs and pushes the updates to the Wiki directly).


Rough Contributing Guide

Style/Code Guidelines

All functions must include the following in order to pass CI tests:

  • Comment based help in the function (vs before the function starts) - see existing function definitions for reference
  • Verbose output via use of Write-Verbose to explain to the user what the function is doing
  • Error catching via try/catch blocks

Pull Request How-To

  1. Fork this project into your own account
  2. Clone your fork to your local machine
  3. Add your changes to your machine's cloned repo
  4. Commit the changes with a decent commit message (i.e. 50 chars or less and descriptive at a high level of what's being added/changed)
  5. Push that commit to your GitHub account
  6. Submit a pull request to this repo with your changes.

@scrthq
Copy link
Member Author

scrthq commented Apr 28, 2018

@jboiselle & @cooper - Custom User Attribute updating working in dev, just figuring out how to also Clear a value if passing $null, as currently it only updates/patches what's there and passing $null does not do anything (similar to the External ID issue for #33 submitted by @cooper as well). Getting this working should solve for both 😃

@scrthq
Copy link
Member Author

scrthq commented Apr 28, 2018

@jboiselle & @cooper - Custom User Attribute updating working in dev, also have clearing them working. Here are a couple options, please let me know which you feel would be easier to work with:

Adding a schema value for a user

Schema Name: employementData
Schema Fields: employeeNumber & jobFamily

Option 1: Using a hashtable

Update-GSUser -User test -CustomSchemas @{
    employmentData = @{
        employeeNumber = "123456789"
        jobFamily      = "Engineering"
	}
}

Option 2: Using a helper function

# Schema Name: employementData
# Schema Fields: employeeNumber & jobFamily
Update-GSUser -User test -CustomSchemas (Add-GSUserCustomSchema -SchemaName employmentData -Fields @{
        employeeNumber = "123456789"
        jobFamily      = "Engineering"
	})

Clearing schema values for a user

Schema Name: employementData
Schema Fields: employeeNumber & jobFamily

Option 1: Using a hashtable

Update-GSUser -User test -CustomSchemas @{
    employmentData = @{
        employeeNumber = $null
        jobFamily      = $null
	}
}

Option 2: Using a helper function

# Schema Name: employementData
# Schema Fields: employeeNumber & jobFamily
Update-GSUser -User test -CustomSchemas (Add-GSUserCustomSchema -SchemaName employmentData -Fields @{
        employeeNumber = $null
        jobFamily      = $null
	})

Thoughts?

@jasilbs
Copy link

jasilbs commented Apr 30, 2018

Hi Nate, I'm not sure if the API allows, but is is possible to set Forwarding via user-level routing in the Admin console, opposed to doing it at the user level settings?

Thanks,
Jeremy

@scrthq
Copy link
Member Author

scrthq commented Apr 30, 2018

Hey Jeremy @jasilbs - trying to picture what you're looking to do still, but I can say that Admin level settings (i.e. Apps > G Suite > Gmail > Advanced Settings) aren't configurable through API calls at this time. Any insight on where you would make that change using the WebUI would help me confirm that better in case I'm off-mark 😃

@jboiselle
Copy link

@scrthq I personally wouldn't mind either way. I'm leaning towards helper function since New-GSUserSchema itself already uses a helper function already anyway. As long as it is all documented! :)

@jasilbs
Copy link

jasilbs commented Apr 30, 2018 via email

@scrthq
Copy link
Member Author

scrthq commented Apr 30, 2018

Thanks, Jeremy!

I'm not seeing any ability to configure email route through the Directory API where it would expectedly be located. The now-deprecated Admin Settings API used to be able to set that at the Org level, but the assemblies for that have not been updated in years and will not be as it stands without Google developing and releasing a full replacement.

Going to keep looking for email route configuration via the Directory API in case I wasn't seeing it on first look, but everything I'm seeing now indicates it's not doable through API, unfortunately.

@scrthq
Copy link
Member Author

scrthq commented Apr 30, 2018

@jboiselle that's my initial thought towards the helper function route (keeping the expectation the same), but in this case it adds a lot of extra typing IMHO, especially considering it would only be abstracting the top level key of the hashtable. The "fields" level hashtable would still be needed and may be less desirable syntactically.

I think for this instance, I'm going to keep it as a pure Hashtable for simplicity (also since that code is ready to push). If there's natural confusion due to the expectation of the helper function, I'll revisit and update it 😄

@scrthq
Copy link
Member Author

scrthq commented Apr 30, 2018

@jboiselle @cooper - User Schema value management added to Update-GSUser and pushed out in v2.5.0, now available on the PSGallery 🌮 . Update-Module PSGSuite; ipmo PSGSuite -Force to update and import the updated version now! 😄

Update-GSUser docs also updated: https://github.com/scrthq/PSGSuite/wiki/Update-GSUser#-customschemas

@jasilbs
Copy link

jasilbs commented May 3, 2018 via email

@phatmandrake
Copy link

phatmandrake commented May 21, 2018

The API supports a Query/Filter feature for groups. Is it possible to update the functions to account for this?

@scrthq
Copy link
Member Author

scrthq commented May 21, 2018

@phatmandrake - So, the odd part about that particular API call is there's no apparent Query parameter in the .NET SDK's implementation of Groups.List() like there is on the REST API directly. Without resorting back to making pure REST API calls, the implementation would need to still pull the full list of groups then filter them down by piping to a Where-Object {.....}, which would be better off done within your own pipeline visible on your script, in my honest opinion, that way you retain visibility towards the filtering and full list of objects returned.

> $request.Query = "email:support*"
The property 'Query' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ $request.Query = "email:support*"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException

The only similar parameter that the .NET SDK provides on Groups.List() is the UserKey parameter, which can be found as Get-GSGroup -Where_IsAMember user@domain.com (-UserKey will also work though as an alias).


Not sure how many groups you're working with or how long it takes you to pull all of them, but the API acts pretty quick for me even when returning the 1730 groups we have (~4 seconds to pull all of them):

[11] ⚡  [PS 5.1.17134.48] ⚡  [0:00:00.0259 @ 6:50:44 PM] [master ≡ +0 ~1 -0 !]
[C:\GDrive\PSModules\PSGSuite2]
[I ♥ Code]> (Get-GSGroup -Verbose).Count
VERBOSE: Building ServiceAccountCredential from P12Key as user 'natxxxxxxxxxxxxx@xxxx.xxx'
VERBOSE: Getting all G Suite groups for customer 'C00xxxxxxxx'
VERBOSE: Retrieved 200 groups...
VERBOSE: Retrieved 400 groups...
VERBOSE: Retrieved 600 groups...
VERBOSE: Retrieved 800 groups...
VERBOSE: Retrieved 1000 groups...
VERBOSE: Retrieved 1200 groups...
VERBOSE: Retrieved 1400 groups...
VERBOSE: Retrieved 1600 groups...
VERBOSE: Retrieved 1730 groups...
1730
[12] ⚡  [PS 5.1.17134.48] ⚡  [0:00:04.0389 @ 6:50:57 PM] [master ≡ +0 ~1 -0 !]
[C:\GDrive\PSModules\PSGSuite2]
[I ♥ Code]>

@megan201296
Copy link

Pull 2FA enrollment / settings info. Not sure if this is already included in a module and I'm just missing it.

@scrthq
Copy link
Member Author

scrthq commented May 25, 2018

hey @megan201296 - you can pull 2FA/2SV enrollment/enforcement stats a few different ways, with my most preferred way going pure PowerShell filtering against the full User List

  1. Get the User List
# Filter using Google's syntax
### Fastest method
### About 99% accurate

PS > $unenrolled = Get-GSUser -Filter "IsEnrolledIn2Sv=false" -Verbose
VERBOSE: Building ServiceAccountCredential from P12Key as user 'natxxxxxxxxxxxxxxxx@xxxxxxx.xxx'
VERBOSE: Getting Users for customer 'xxxxxxxxxx' matching filter: "IsEnrolledIn2Sv=False"
VERBOSE: Retrieved 500 users...
VERBOSE: Retrieved 1000 users...
VERBOSE: Retrieved 1500 users...
VERBOSE: Retrieved 2000 users...
VERBOSE: Retrieved 2500 users...
VERBOSE: Retrieved 3000 users...
VERBOSE: Retrieved 3335 users...
PS > ($unenrolled | Where-Object {$_.IsEnrolledIn2Sv}).Count
1

###

# Pull full list of users and filter by piping the results to Where-Object
### Can be slower depending on the user count matching your filter vs total user count
### 100% Accuracy

PS $unenrolled = Get-GSUser -Filter * -Verbose | Where-Object {!$_.IsEnrolledIn2Sv}
VERBOSE: Building ServiceAccountCredential from P12Key as user 'natxxxxxxxxxxxxxxxx@xxxxxxx.xxx'
VERBOSE: Getting all Users for customer 'xxxxxxxxxx'
VERBOSE: Retrieved 500 users...
VERBOSE: Retrieved 1000 users...
VERBOSE: Retrieved 1500 users...
VERBOSE: Retrieved 2000 users...
VERBOSE: Retrieved 2500 users...
VERBOSE: Retrieved 3000 users...
VERBOSE: Retrieved 3500 users...
VERBOSE: Retrieved 4000 users...
VERBOSE: Retrieved 4500 users...
VERBOSE: Retrieved 5000 users...
VERBOSE: Retrieved 5500 users...
VERBOSE: Retrieved 6000 users...
VERBOSE: Retrieved 6500 users...
VERBOSE: Retrieved 7000 users...
VERBOSE: Retrieved 7500 users...
VERBOSE: Retrieved 8000 users...
VERBOSE: Retrieved 8500 users...
VERBOSE: Retrieved 9000 users...
VERBOSE: Retrieved 9099 users...
PS > ($unenrolled | Where-Object {$_.IsEnrolledIn2Sv}).Count
0
  1. Get the User Report
# Useful if you need a report that includes pure numbers already
### Reports are specified by date
### Some dates don't capture every data point, including 2SV stats
PS > $usage = Get-GSUsageReport -Date (Get-Date).AddDays(-2)
PS > ($usage | Where-Object {$_.Name -like '*2SV*'})


Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 3555
MsgValue         :
Name             : accounts:num_users_2sv_enforced
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 5763
MsgValue         :
Name             : accounts:num_users_2sv_enrolled
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 3554
MsgValue         :
Name             : accounts:num_users_2sv_enrolled_and_enforced
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 5528
MsgValue         :
Name             : accounts:num_users_2sv_not_enforced
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 3320
MsgValue         :
Name             : accounts:num_users_2sv_not_enrolled
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 3319
MsgValue         :
Name             : accounts:num_users_2sv_not_enrolled_and_not_enforced
StringValue      :

Date             : 2018-05-22
BoolValue        :
DatetimeValueRaw :
DatetimeValue    :
IntValue         : 1
MsgValue         :
Name             : accounts:num_users_2sv_not_enrolled_but_enforced
StringValue      :

@nsclarkson
Copy link

Love to see RoleAssignmentsResource so I can grant users admin role.

Thanks!

@scrthq
Copy link
Member Author

scrthq commented Jun 4, 2018

@nsclarkson On it!

@queks
Copy link

queks commented Jun 8, 2018

If it were possible, could we get a corresponding set of functions for Google Documents as PSGSuite currently has for Google Sheets? (i.e. clear, copy, export, import, new, get-info)

In addition, is it possible for both sheets and documents to be converted to other file formats, like PDF?

@scrthq
Copy link
Member Author

scrthq commented Jun 8, 2018

@queks - There's no Docs specific API like there is for Sheets, unfortunately, so you're limited to Drive File level interaction not file content interaction. This would allow you to do things like getting file metadata (via Get-GSDriveFile -FileId $doc.Id), create new Docs (via New-GSDriveFile -Name 'New Doc' -MimeType Docs), or exporting as a defined MimeType, i.e. PDF (via Export-GSDriveFile -FileID $doc.id -Type PDF -OutFilePath C:\test\doc.pdf). Hopefully that helps clarify!

Please note that there is a current bug with Export-GSDriveFile that should be resolved by tonight/tomorrow. You can track that in issue #51

@queks
Copy link

queks commented Jun 9, 2018

Got it. Thank you.

@scrthq
Copy link
Member Author

scrthq commented Jun 9, 2018

@queks - v2.6.3 has been released with the fix for issue #51 (Export-GSDriveFile). Couple other useful pieces of info for you:


Regarding replication of Import-GSSheet for Docs; you can use the following to pull the content of a Doc down in PlainText, effectively pulling down that Doc's text, with the following:

Export-GSDriveFile -FileId $doc.id -Type PlainText

Worth noting that this will always return a single string, so if you need it split to replicate the behavior of Get-Content, you'll need to split it by New Line, i.e.

$docContent = (Export-GSDriveFile -FileId $doc.id -Type PlainText) -split "`n"

I could add a wrapper function designed specifically for this if desired, something along the lines of the following (let me know!):

$docContent = Get-GSDocContent -FileId $doc.id


Also, I should be able to get something going to allow updating of Docs, just trying to figure out how to best approach it in a way that makes sense. Some scenarios here, let me know your feedback on them:

  1. Writing plain text to a doc (i.e. logging, etc).
    • This would be similar to Out-File and would support an -Append switch to attach new strings to the end of the file.
    • This would be limited to PlainText only
    • Proposed function names (let me know which makes most sense):
      • Set-GSDocContent/Add-GSDocContent
      • Out-GSDoc/Out-GSDoc -Append
      • Out-GSDriveFile/Out-GSDriveFile -Append
  2. Pull in an existing file as a byte array and update the file in Drive
    • This would allow updating of any file type, including binary files
    • No option to send strings directly, but not limited to PlainText either
    • This would be literally updating a Drive file's content with a local file's content.
    • Proposed function name:
      • Update-GSDriveFile

@queks
Copy link

queks commented Jun 12, 2018 via email

@scrthq
Copy link
Member Author

scrthq commented Jun 12, 2018

@queks sometimes I forget about the code that I wrote myself even, so no worries! 😜 You can also swap to -Type HTML if you want to pull down an HTML representation of that Doc (useful for creating nice fancy email templates, if you'd like!)

For the writing to Docs bits, I think I'm going to implement both. The first option would be for purely using a Doc the same as a local text file, while the second option allows for updating of any filetype (even binary files). Converting to a byte stream is easy and there wouldn't be any special character issues in that case, pure byte goodness. I'll keep you updated!

@scrthq
Copy link
Member Author

scrthq commented Jun 13, 2018

Hey everyone! Since there are a few feature requests on the board now, I've transitioned them out to their own issues to better track. I am going to shut this issue down now, but the discussion has been great so far!

If you have any questions/comments/feature requests/bug reports/etc, please feel free to open up a new issue 😄

Thanks, y'all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants