SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

Data Transfer calendar release ressources #213

Closed ABricka closed 5 years ago

ABricka commented 5 years ago

Hi @scrthq , i can't find any solution to your Start-GSDataTransfer command for apply the release_ressource parameter. I imagine is possible cause "GAM" do it but I don't want to use gam only for this so if you got any hidden feature or whatever to do it I'll be very happy :)

For "help" there is the gam command in first and my command in 2nd i want to implement the release ressource :

gam create datatransfer oldguy@acme.com calendar newguy@acme.com release_resources true

Start-GSDataTransfer -OldOwnerUserId $username -NewOwnerUserId $Ownershipuname -ApplicationID 435XXXXXXXXX -PrivacyLevel SHARED

Alex

scrthq commented 5 years ago

Hey @ABricka - It looks like that Start-GSDataTransfer needs to be updated to support it! Privacy_Level is Drive and Docs specific, but I'm seeing the RELEASE_RESOURCES TransferParam on the Calendar DataTransferApplication specifically:

image

Considering this a feature request, I'll let you know once available!

ABricka commented 5 years ago

Super :) That's a great new ! Waiting about you to use it :) Thanks a lot for this fast reaction 👍

scrthq commented 5 years ago

Hey @ABricka - added support for this in 2.31.0! Usage (note that ReleaseResources is a [Switch] parameter, so no need to pass $true):

$calendarApp = Get-GSDataTransferApplication | Where-Object {$_.Name -eq 'Calendar'}
Start-GSDataTransfer -OldOwnerUserId $username -NewOwnerUserId $Ownershipuname -ApplicationID $calendarApp.Id -ReleaseResources
ABricka commented 5 years ago

Super, thanks a lot 👍

scrthq commented 5 years ago

You bet!

Sent with GitHawk