Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed Jun 14, 2018
1 parent 2b96a62 commit e0b090c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ A minimal set of legacy commands are also available in this PowerShell module. O
These cmdlets will be ported over to use the REST api functions when they are ported to the REST api when they are made available in future OPNsense firmware versions.

## Getting Started

### Install PS_OPNsense Module
To find out the location of the Modules directory, check the PSModulePath environment variable:
```powershell
$Env:PSModulePath -split ";" # On Windows
Expand All @@ -71,6 +73,7 @@ Get all the commands in the PS_OPNsense module type:
Get-Command -Module PS_OPNsense
```

### Create an API key in OPNsense
From the OPNsense GUI, create an API key for a user that will run PowerShell scripts:
- Open System > Access > Users.
- Click on a user that will be used for accessing the REST api.
Expand All @@ -87,8 +90,8 @@ Connect-OPNsense 'https://opnsense.local' <api_key> <api_secret> -SkipCertificat
```
Run some commands:
```powershell
Invoke-OPNsenseCommand core firmware status -Verbose
$(Invoke-OPNsenseCommand core firmware info).changelog
Get-OPNsenseItem -Cron Job
Get-OPNsensePackage -Plugin
```
Disconnect from the server:
```powershell
Expand Down

0 comments on commit e0b090c

Please sign in to comment.