New-SafeLinksPolicy

This cmdlet is available only in the cloud-based service. Use the New-SafeLinksPolicy cmdlet to create Safe Links policies in your cloud-based organization. For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://technet.microsoft.com/library/bb123552.aspx).

Syntax

New-SafeLinksPolicy
   [-Name] <String>
   [-AdminDisplayName <String>]
   [-AllowClickThrough <$true | $false>]
   [-Confirm]
   [-DoNotAllowClickThrough <$true | $false>]
   [-DoNotRewriteUrls <MultiValuedProperty>]
   [-DoNotTrackUserClicks <$true | $false>]
   [-Enabled <$true | $false>]
   [-EnableForInternalSenders <$true | $false>]
   [-ExcludedUrls <String[]>]
   [-IsEnabled <$true | $false>]
   [-ScanUrls <$true | $false>]
   [-TrackClicks <$true | $false>]
   [-WhatIf]
   [-WhiteListedUrls <String>]
   [<CommonParameters>]

Description

Safe Links is a feature in Advanced Threat Protection that checks links in email messages to see if they lead to malicious web sites. When a user clicks a link in a message, the URL is temporarily rewritten and checked against a list of known, malicious web sites. Safe Links includes the URL trace reporting feature to help determine who has clicked through to a malicious web site.

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet (https://technet.microsoft.com/library/mt432940.aspx).

Examples

-------------------------- Example 1 --------------------------

New-SafeLinksPolicy -Name "Marketing Block URL" -IsEnabled $true -TrackClicks $true

This example creates a new Safe Links policy named Marketing Block URL with the following options:

  • The policy is enabled.

  • Users aren't allowed to click through to the original URL. This is the default value of the AllowClickThrough parameter, so you don't need to specify it.

  • User clicks on URLs are tracked in URL trace.

Required Parameters

-Name

The Name parameter specifies a unique name for the Safe Links policy. If the value contains spaces, enclose the value in quotation marks (").

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection

Optional Parameters

-AdminDisplayName

The AdminDisplayName parameter specifies a description for the policy. If the value contains spaces, enclose the value in quotation marks (").

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-AllowClickThrough

This parameter is reserved for internal Microsoft use.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-Confirm

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-DoNotAllowClickThrough

The DoNotAllowClickThrough parameter specifies whether to allow users to click through to the original URL. Valid values are:

  • $true: The user isn't allowed to click through to the original URL. This is the default value.

  • $false: The user is allowed to click through to the original URL.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-DoNotRewriteUrls

The DoNotRewriteUrls parameter specifies a URL that's skipped by Safe Links scanning. You can specify multiple values separated by commas.

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-DoNotTrackUserClicks

The DoNotTrackUserClicks parameter specifies whether to track user clicks related to links in email messages. Valid values are:

  • $true: User clicks aren't tracked. This is the default value.

  • $false: User clicks are tracked.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-EnableForInternalSenders

PARAMVALUE: $true | $false

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-Enabled

This parameter specifies whether the rule or policy is enabled. Valid values are:

  • $true: The rule or policy is enabled.

  • $false: The rule or policy is disabled.

The default value is $false

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-ExcludedUrls

The ExcludedUrls parameter specifies a URL that's skipped by Safe Links scanning. You can specify multiple values separated by commas.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-IsEnabled

This parameter is reserved for internal Microsoft use..

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-ScanUrls

The ScanUrls parameter specifies whether to enable or disable the scanning of links in email messages. Valid values are:

  • $true: Scanning links in email messages is enabled.

  • $false: Scanning links in email messages is disabled. This is the default value.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-TrackClicks

This parameter is reserved for internal Microsoft use.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-WhatIf

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-WhiteListedUrls

This parameter is reserved for internal Microsoft use.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection

Inputs

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?linkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.

Outputs

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?linkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.