Click or drag to resize

Basic Connection

This example:

  1. establishes a read-only connection to management,
  2. prints the first 5 host names,
  3. finially logs off, closing the connection to the server.

C#
// Login to Check Point Management Web Service
var session = await Session.Login(
             managementServer: ManagementServer,
             userName: Username,
             password: Password,
             certificateHash: CertificateHash
         );

// Get first 5 hosts
var hosts = await session.FindHosts(limit: 5);

foreach (var host in hosts)
{
    Console.WriteLine(host.Name);
}

// Disconnect from server
await session.Logout();
See Also