Check out the GitHub wiki for PSGSuite for help with setting up as well as full function help!
Interested in helping out with PSGSuite development? Please check out our Contribution Guidelines!
Please adhere to our Code of Conduct when interacting with this repo.
- PowerShell Core support for cross-platform functionality
- P12 Keys (service accounts) and client_secrets.json (OAuth) are both now supported
- All Drive functions now support Team Drives
- Get-GSGmailMessage can now save message attachments to a local path
- File uploads to Drive are now supported (including recursive folder uploads!)
The Gmail API does not yet support handling inbox delegation. The functionality addition has been pushed back again until Q3 of 2018. Once the Gmail API supports inbox delegation, those functions will be added.
Delegation functions have been re-added to PSGSuite as of v2.4.0! Update now to get all the goodness of v2 + delegation commands!
Please note that not all functions were ported to PSGSuite 2.0.0 due to restrictions within the .NET SDK and deprecated API calls. Here is the list of functions no longer existing in PSGSuite as of 2.0.0:
- Get-GSToken: no need for this as the keys are being consumed by Googles Auth SDK directly now, which makes Access/Refresh tokens non-existent for P12 Key service accounts and token management is handled automatically
- Revoke-GSToken: same here, no longer needed due to auth service changes
- Start-PSGSuiteConfigWizard: no longer supported as WPF is not compatible outside of Windows
All other functions are either intact or have an alias included to support backwards compatibility in scripts. Full list of aliases:
Alias Maps To
----- -------
Add-GSDriveFilePermissions Add-GSDrivePermission
Export-PSGSuiteConfiguration Set-PSGSuiteConfig
Get-GSCalendarResourceList Get-GSResourceList
Get-GSDataTransferApplicationList Get-GSDataTransferApplication
Get-GSDriveFileInfo Get-GSDriveFile
Get-GSDriveFilePermissionsList Get-GSDrivePermission
Get-GSGmailFilterList Get-GSGmailFilter
Get-GSGmailLabelList Get-GSGmailLabel
Get-GSGmailMessageInfo Get-GmailMessage
Get-GSGroupList Get-GSGroup
Get-GSGroupMemberList Get-GSGroupMember
Get-GSMobileDeviceList Get-GSMobileDevice
Get-GSOrganizationalUnitList Get-GSOrganizationalUnit
Get-GSOrgUnit Get-GSOrganizationalUnit
Get-GSOrgUnitList Get-GSOrganizationalUnit
Get-GSOU Get-GSOrganizationalUnit
Get-GSResourceList Get-GSResource
Get-GSShortURLInfo Get-GSShortURL
Get-GSTeamDrivesList Get-GSTeamDrive
Get-GSUserASPList Get-GSUserASP
Get-GSUserLicenseInfo Get-GSUserLicense
Get-GSUserLicenseList Get-GSUserLicense
Get-GSUserList Get-GSUser
Get-GSUserSchemaInfo Get-GSUserSchema
Get-GSUserSchemaList Get-GSUserSchema
Get-GSUserTokenList Get-GSUserToken
Import-PSGSuiteConfiguration Get-PSGSuiteConfig
Move-GSGmailMessageToTrash Remove-GSGmailMessage
New-GSCalendarResource New-GSResource
Remove-GSGmailMessageFromTrash Restore-GSGmailMessage
Set-PSGSuiteDefaultDomain Switch-PSGSuiteConfig
Switch-PSGSuiteDomain Switch-PSGSuiteConfig
Update-GSCalendarResource Update-GSResource
Update-GSSheetValue Export-GSSheet
- Issue #87
- Added: Additional scopes during Service creation for
Get-GSCourseParticipant
andGet-GSClassroomUserProfile
to enable pulling of full user profile information. - Thanks, @jdstanberry!
- Added: Additional scopes during Service creation for
- Issue #111
- Added:
DisableReminder
switch parameter toNew-GSCalendarEvent
andUpdate-GSCalendarEvent
to remove Reminder inheritance from the calendar the event is on as well as any Reminder overload definitions.
- Added:
- Issue #53
- Updated:
Get-GSContactList
andRemove-GSContact
Token retrieval and overall cleanup
- Updated:
- Various/Other
- Updated:
Get-GSToken
to align parameters more withNew-GoogleService
- Updated:
- Issue #87
- Added:
Get-GSCourseParticipant
andGet-GSClassroomUserProfile
now have theFields
parameter - Added:
Sync-GSUserCache
to create a hashtable of users for quick lookups throughout scripts
- Added:
- Issue #53 via PR #108 - Thanks, @dwrusse!
- Added:
Get-GSContactList
- Added:
Remove-GSContact
- Added:
- Other additions via PR #108 - Thanks, @dwrusse!
- Added:
Remove-GSCalendarEvent
- Added:
New-GSGmailLabel
- Added:
Remove-GSGmailLabel
- Added:
- Issue #103
- Fixed:
SendNotificationEmail
is now correctly defaulting to$false
, but attempting to actually send the notification email results in an error. This is now corrected.
- Fixed:
- Validated deployment via Azure Pipelines
- Issue #102
- Fixed:
$EncryptionKey
PSM1 parameter now stores the AES key correctly so SecureStrings are encrypted/decrypted as intended.
- Fixed:
- Issue #103
- Updated:
SendNotificationEmail
parameter onAdd-GSDrivePermission
defaults to false for all User & Group permissions that are not ownership transfers. - Updated: Documentation for
SendNotificationEmail
parameter onAdd-GSDrivePermission
for clarity towards default Google API parameter values.
- Updated:
- Moved:
Get-GSToken
andNew-GoogleService
to Public functions under the Authentication section - Added: More unit testing for
Get-GSUser
- Updated:
psake
build script
- Fixed: Module deployment segment in psake script deploying decompiled/broken module
- Updated: Build script to compile module into a single PSM1 file for cleanliness and loading speed improvements
- Issue #96
- Updated the following on
Get-GSGroup
:- Set default scope to
Customer
so that getting the list of groups expectedly gets all of them, not just the ones in your primary domain - Added
Domain
parameter to specify which domain to list groups from your customer account - Added
Filter
parameter to only list groups matching the Group query syntax - Moved the
Get-GSGroupListPrivate
private function into the body ofGet-GSGroup
for error clarity
- Set default scope to
- Updated the following on
- Others:
- Moved the
Get-GSUserListPrivate
private function into the body ofGet-GSUser
for error clarity - Improved error handling for User and Message List functions when there are no results.
- Moved the
- Issue #87
- Fixed
Add-GSCourseParticipant
error:"Cannot convert the "student@uni.edu" value of type "System.String" to type "Google.Apis.Classroom.v1.Data.Student"."
- Set
$request.Fields = "*"
forGet-GSCourseParticipant
andGet-GSClassroomUserProfile
to return all available fields for theProfile
, includingEmailAddress
- Fixed
- Issue #93
- Added:
MaxToModify
parameter toRemove-GSGmailMessage
andUpdate-GSGmailMessageLabels
in theFilter
parameter set to prevent removing/updating more messages than expected when using a filter to gather the list of messages to update.
- Added:
- Added:
Id
alias forUser
parameter onGet-GSUser
for better pipeline support
- Pull Request #94 Thanks, @dwrusse!
- Added
Update-GSGmailLabel
to enable updating of Gmail label properties - Added
Update-GSGmailMessageLabel
enable updating of labels attached to Gmail messages
- Added
- Issue #93
- Updated
Remove-GSGmailMessage
to include a-Filter
parameter to allow removal of messages matching a filter in a single command - Improved pipeline support for
Remove-GSGmailMessage
- Updated
- Issue #87
- Added
User
parameter to all Classroom functions to specify which user to authenticate the request as
- Added
- Issue #90
- Added
Update-GSUserPhoto
- Added
Remove-GSUserPhoto
- Added
- Updated Gmail Delegation functions to use the .NET SDK after Google announced delegation support for the Gmail API
- Cleaned up
Get-GSGmailDelegates
by removing the trailings
(nowGet-GSGmailDelegate
). Added the original function as an alias to the new function for backwards compatibility with scripts. - Removed the
Raw
parameter fromGet-GSGmailDelegate
since it's no longer applicable. - Enabled
Get-GSGmailDelegate
to perform both Get and List requests (previously only performed List requests)
- Issue #87
- Removed
Add-Member
calls fromGet-GSCourseParticipant
to resolve item 3 on issue - Cleaned up
CourseStates
parameter onGet-GSCourse
to validate against the Enum directly and removed the default parameter value to resolve item 2 on issue - Cleaned up
State
parameter onGet-GSStudentGuardianInvitation
to validate against the Enum directly in an effort to prevent the same issue as item 2
- Removed
- Issue #85
- Added Google Classroom support with the following functions:
Add-GSCourseParticipant
Confirm-GSCourseInvitation
Get-GSClassroomUserProfile
Get-GSCourse
Get-GSCourseAlias
Get-GSCourseInvitation
Get-GSCourseParticipant
Get-GSStudentGuardian
Get-GSStudentGuardianInvitation
New-GSCourse
New-GSCourseAlias
New-GSCourseInvitation
New-GSStudentGuardianInvitation
Remove-GSCourse
Remove-GSCourseAlias
Remove-GSCourseInvitation
Remove-GSCourseParticipant
Remove-GSStudentGuardian
Update-GSCourse
- Added Google Classroom support with the following functions:
- Fixed:
Get-GSToken
Create/Expiry time split issue on macOS caused by difference in-UFormat %s
(macOS doesn't have trailing milliseconds) - Fixed: Logic in confirming if UserID is
[decimal]
to prevent unnecessary errors