Skip to content

PowerShell module to interact with SonicWall's SonicOS API.

License

Notifications You must be signed in to change notification settings

mmeseguer/PSSonicWall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

PSSonicWall

This PowerShell module provides a set of functions to interact with SonicWall appliances using its SonicOS API.

Prerequisites

First of all you must activate the SonicOS API in your SonicWall appliance. SonicOS API was introduced in SonicOS 6.5.1 so if you have a previous version you must first upgrade your appliance in order to use this module.

To activate the SonicOS API you can follow these steps(instructions taken from the SonicOS API Reference):

  • Navigate to MANAGE | Network > Appliance | Base Settings.
  • Scroll to the SonicOS API section.
  • Select Enable SonicOS API.
  • Select Enable RFC-2617 HTTP Basic Access authentication.
  • Click Accept.

Connecting and disconnecting to a SonicWall Appliance

The first step for accessing the SonicOS API using PSSonicWall is to connect to the appliance. For that purpose you can use Connect-SWAppliance:

Connect-SWAppliance -Server 192.168.168.168

When you are done with the API interaction you should disconnect your session. To do so you can use Disconnect-SWAppliance:

Disconnect-SWAppliance

Using Get functions

Once you are connected you can use PSSonicWall to read all the information that SonicOS API can offer. Here's a list of the Get commands currently available:

Function Description
Get-SWAccessRule Retrieve Access Rules
Get-SWAddressGroup Retrieve Address Groups
Get-SWAddressObject Retrive Address Objects
Get-SWDns Retrieve DNS configuration
Get-SWInterface Retrieve interfaces
Get-SWNatPolicy Retrieve NAT Policies
Get-SWRoutePolicy Retrieve Routing Policies
Get-SWSchedule Retrieve Schedules
Get-SWServiceGroup Retrieve Service Groups
Get-SwZone Retrieve Zones

If you want to know more about a certain function you can use Get-Help NameOfTheFuncion to know more.

About

PowerShell module to interact with SonicWall's SonicOS API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published