Powershell script to automate the creation of required Office 365 IP addresses or URLs in a Checkpoint management server

Discussion created by David GOURANTON on Mar 13, 2017
Latest reply on Sep 19, 2018 by Security Administrator


Here is a Powershell script that will automate the creation of all Office 365 IP addresses and URLs in a management server R80+ :

*** UPDATE ***

Here is an improved version of the script : Create-O365CheckpointObjects.ps1


It depends on the ConvertFrom-O365AddressesXMLFile module (https://github.com/it-praktyk/Conver...dressesXMLFile). So you need to install it first.


Here is the help :


  Create the required objects in a Checkpoint R80+ management server to allow Office 365 traffic

  Create-O365CheckpointObjects.ps1 [-Server] <String> [[-Port] <Int32>]
  [[-DomainName] <String>] [[-Service] <String>] [[-Prefix] <String>] [[-Category] <String>] [-Type] <String>

  This script will connect to

  and download an XML file containing the required objects to allow Office 365 traffic to pass.
  It will then create the objects (IPv4, IPv6 addresses or URLs) into the Checkpoint management
  server using the R80+ API, according to the selected parameters.
  It depends on the ConvertFrom-O365AddressesXMLFile module

  -Server <String>
  The mandatory Checkpoint management server hostname or IP address

  -Port <Int32>
  The Checkpoint R80 API port
  By default, 443 will be used

  -DomainName <String>

  -Service <String>
  An optional Office 365 to filter on (among "WAC","Sway","Planner","Yammer","OfficeMobile", "ProPlus",
  "RCA","OneNote","OfficeiPad","EXO","SPO","Office365Video","LYO","Identity","CRLs","o365" and "EOP"
  If not specified, all Office 365 services objects will be created

  -Prefix <String>
  A prefix for the Office 365 objects in the Checkpoint management server
  By default, "O365" will be used

  -Category <String>
  The primary category for the Office 365 application objects in the Checkpoint management server
  By default, "Microsoft & Office365 Services" will be used

  -Type <String>
  A mandatory object type to filter on (among "IPv4","IPv6","URL")

  Cette applet de commande prend en charge les paramètres courants*: Verbose, Debug,
  ErrorAction, ErrorVariable, WarningAction, WarningVariable,
  OutBuffer, PipelineVariable et OutVariable. Pour plus d’informations, voir
  about_CommonParameters (

  -------------------------- EXEMPLE 1 --------------------------

  PS C:\>Create-O365CheckpointObjects -Server cpserver -Type IPv4

  Will create the IPv4 objects for all the Office 365 apps in a Checkpoint management server
  named "cpserver"

  -------------------------- EXEMPLE 2 --------------------------

  PS C:\>Create-O365CheckpointObjects -Server cpserver -Service LYO -Type IPv6 -Verbose

  Will create the IPv6 network objects for Skype for Business in a Checkpoint management server
  named "cpserver"

  -------------------------- EXEMPLE 3 --------------------------

  PS C:\>Create-O365CheckpointObjects -Server cpserver -Service EOP -Type URL -Category "Exchange"

  Will create an application object for Exchange Online, with the required URLs, and a primary
  category set to "Exchange"

  Pour consulter les exemples, tapez: "get-help Create-O365CheckpointObjects.ps1 -examples".
  Pour plus d'informations, tapez: "get-help Create-O365CheckpointObjects.ps1
  Pour obtenir des informations techniques, tapez: "get-help Create-O365CheckpointObjects.ps1 -full".