Skip to content

New GEmailSettingsFilter

Spencer Varney edited this page Dec 9, 2016 · 5 revisions

Deprectiation Notice: The Email Settings API is deprecated and will be turned off on July 7, 2017. Migrate to the Gmail API as soon as possible to avoid disruptions to your application. See the following URL for more information: https://developers.google.com/admin-sdk/email-settings/

New-GEmailSettingsFilter

SYNOPSIS

Create a Google Mail filter.

SYNTAX

New-GEmailSettingsFilter [-UserName] <String> [[-From] <String>] [[-To] <String>] [[-Subject] <String>]
 [[-HasTheWords] <String>] [[-DoesntHave] <String>] [[-HasAttachment] <Boolean>] [[-ArchiveIt] <Boolean>]
 [[-MarkAsRead] <Boolean>] [[-StarIt] <Boolean>] [[-ApplyTheLabel] <String>] [[-ForwardIt] <String>]
 [[-DeleteIt] <Boolean>] [[-NeverSendItToSpam] <Boolean>] [-Domain <String>] [-GAuthId <String>] [-WhatIf]
 [-Confirm]

DESCRIPTION

Create a Google Mail filter.

EXAMPLES

---------- EXAMPLE 1 ----------

PS C:\> New-GEmailSettingsFilter -UserName $SomeUserNameString

This automatically generated example serves to show the bare minimum required to call this Cmdlet.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

PARAMETERS

-UserName

The target Google Apps user.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-From

The email must come from this address in order to be filtered.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 2
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-To

The email must be sent to this address in order to be filtered.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 3
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-Subject

A string the email must have in its subject line to be filtered.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 4
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-HasTheWords

A string the email can have anywhere in it's subject or body.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 5
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-DoesntHave

A string that the email cannot have anywhere in its subject or body.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 6
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-HasAttachment

A boolean representing whether or not the email contains an attachment.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 7
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-ArchiveIt

Whether to automatically move the message to "Archived" state if it matches the specified filter criteria

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 8
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-MarkAsRead

Whether to automatically mark the message as read if it matches the specified filter criteria

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 9
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-StarIt

Whether to automatically star the message if it matches the specified filter criteria

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 10
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-ApplyTheLabel

The name of the label to apply if a message matches the specified fitler criteria.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 11
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-ForwardIt

Whether to automatically forward the message to the given verified email address if it matches the filter criteria. The forwarding email address must be validated or an error is returned.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 12
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-DeleteIt

Whether to automatically move the message to "Trash" state if it matches the specified filter criteria

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 13
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-NeverSendItToSpam

Whether to automatically move the message to "Spam" state if it matches the specified filter criteria

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 14
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-Domain

The target domain for this email settings cmdlet.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GAuthId

The GAuthId representing the gShell auth credentials this cmdlet should use to run.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

System.String

The target domain for this email settings cmdlet.

OUTPUTS

NOTES

Part of the gShell Project, relating to the Google Email Settings API; see Related Links or use the -Online parameter.

RELATED LINKS

[Wiki page for this Cmdlet]

[Getting started with gShell]

Clone this wiki locally