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

Additional Reports Since Last Edited #359 #360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions PSGSuite/Public/Reports/Get-GSActivityReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ function Get-GSActivityReport {
Application name for which the events are to be retrieved.

Available values are:
* "AccessTransparency": Access Transparency logs provide information about the actions of Google staff when they access your data.
* "Admin": The Admin console application's activity reports return account information about different types of administrator activity events.
* "Calendar": The G Suite Calendar application's activity reports return information about various Calendar activity events.
* "Chat": Track user conversations and room activity
* "Drive": The Google Drive application's activity reports return information about various Google Drive activity events. The Drive activity report is only available for G Suite Business customers.
* "Gcp": Gcp Activity
* "Gplus": The Google+ application's activity reports return information about various Google+ activity events.
* "Groups": The Google Groups application's activity reports return information about various Groups activity events.
* "GPlus": The Google+ application's activity reports return information about various Google+ activity events.
* "GroupsEnterprise": You can use the Groups Enterprise audit log to see a record of actions performed on groups (including target audiences) and group memberships.
* "Jamboard": Track changes to Jamboards
* "Login": The G Suite Login application's activity reports return account information about different types of Login activity events.
* "Meet": Track users' Meet recording activity
* "Mobile": The G Suite Mobile Audit activity report return information about different types of Mobile Audit activity events.
* "Rules": The G Suite Rules activity report return information about different types of Rules activity events.
* "Saml": View your users' sign-ins to SAML applications
* "Token": The G Suite Token application's activity reports return account information about different types of Token activity events.
* "UserAccounts": You can check critical actions carried out by users on their own accounts. These actions include changes to passwords, account recovery details (telephone numbers, email addresses), and 2-Step Verification enrollment.

Defaults to "Admin"

Expand Down Expand Up @@ -60,7 +68,7 @@ function Get-GSActivityReport {
[String]
$UserKey = 'all',
[parameter(Mandatory = $false,Position = 1)]
[ValidateSet("Admin","Calendar","Drive","Groups","GPlus","Login","Mobile","Rules","Token")]
[ValidateSet("AccessTransparency","Admin","Calendar","Chat","Drive","Gcp","Gplus","Groups","GroupsEnterprise","Jamboard","Login","Meet","Mobile","Rules","Saml","Token","UserAccounts")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this ValidateSet Dynamic with this code:

[parameter(Mandatory = $false,Position = 1)]
[ArgumentCompleter(
    {
        param($Command, $Parameter, $WordToComplete, $CommandAst, $FakeBoundParams)
        $possibleValues = [Google.Apis.Admin.Reports.reports_v1.ActivitiesResource+ListRequest+ApplicationNameEnum].GetEnumNames()
        $possibleValues | Where-Object {$_ -like "$WordToComplete*"}
    }
)]
[ValidateScript({[Google.Apis.Admin.Reports.reports_v1.ActivitiesResource+ListRequest+ApplicationNameEnum].GetEnumnames()})]
[String]
$ApplicationName = "Admin",

That will use the list from the enum to validate against, and also use it for argument completion (aka pressing Tab).

[String]
$ApplicationName = "Admin",
[parameter(Mandatory = $false,Position = 2)]
Expand Down