David GOURANTON

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 Apr 19, 2017 by David GOURANTON

Hi,

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

https://gist.github.com/anonymous/56...a94a2bdfe91912

 

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 :

NOM
  Create-O365CheckpointObjects.ps1

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


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


DESCRIPTION
  This script will connect to https://support.content.office.net/en-us/static/O365IPAddresses.xml
  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
  (https://github.com/it-praktyk/Convert-Office365NetworksData/tree/master/ConvertFrom-O365AddressesXMLFile).


PARAMÈTRES
  -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")

  <CommonParameters>
  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 (http://go.microsoft.com/fwlink/?LinkID=113216).

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

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

  Description:
  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

  Description:
  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"

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




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

Outcomes