Add-IPBlockListEntry
This cmdlet is available or effective only on Edge Transport servers in on-premises Exchange.
Use the Add-IPBlockListEntry cmdlet to add IP Block list entries to the IP Block list that's used by the Connection Filtering agent on Edge Transport servers.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
Syntax
Add-IPBlockListEntry
-IPAddress <IPAddress>
[-Comment <String>]
[-Confirm]
[-ExpirationTime <DateTime>]
[-Server <ServerIdParameter>]
[-WhatIf]
[<CommonParameters>]
Add-IPBlockListEntry
-IPRange <IPRange>
[-Comment <String>]
[-Confirm]
[-ExpirationTime <DateTime>]
[-Server <ServerIdParameter>]
[-WhatIf]
[<CommonParameters>]
Description
On Edge Transport servers, you need to be a member of the local Administrators group to run this cmdlet.
Examples
Example 1
Add-IPBlockListEntry -IPAddress 192.168.0.100
This example adds the IP address 192.168.0.100 to the list of blocked IP addresses.
Example 2
Add-IPBlockListEntry -IPRange 192.168.0.1/24 -ExpirationTime "1/3/2014 23:59"
This example adds the IP address range 192.168.0.1/24 to the list of blocked IP addresses and configures the IP Block list entry to expire at 23:59 on January 3, 2014.
Parameters
-Comment
The Comment parameter specifies an optional comment. If you specify a value that contains spaces, enclose the value in quotation marks ("), for example: "This is an admin note".
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-ExpirationTime
The ExpirationTime parameter specifies a day and time when the IP Block list entry that you're creating will expire. If you specify a time only and you don't specify a date, the current day is assumed.
Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format MM/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-IPAddress
The IPAddress parameter specifies a single IP address to add to the IP Block list, for example, 192.168.0.1.
Type: | IPAddress |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-IPRange
The IPRange parameter specifies a range of IP addresses to add to the IP Block list. Valid values are:
- IP address range: 192.168.0.1-192.168.0.254.
- Classless Inter-Domain Routing (CIDR) IP address range: 192.168.0.1/24.
Type: | IPRange |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-Server
The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
- Name
- FQDN
- Distinguished name (DN)
- Exchange Legacy DN
If you don't use this parameter, the command is run on the local server.
You can't use this parameter to configure other Edge Transport servers remotely.
Type: | ServerIdParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019 |
Inputs
Input types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
Outputs
Output types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn't return data.