35 Commits

Author SHA1 Message Date
GraceSolutions 8731b7303f Add verbose logging of API endpoint URLs 2025-04-18 10:30:58 -04:00
GraceSolutions 5330e620b2 Add release folder to .gitignore 2025-04-18 10:18:01 -04:00
GraceSolutions 5c845b1be6 Implement centralized API endpoint mapping and fix DHCP API paths 2025-04-18 10:15:53 -04:00
GraceSolutions a413875058 Update Test-OPNSenseThreading cmdlet to work without connection (v2025.04.15.1749) 2025-04-15 17:50:27 -04:00
GraceSolutions 459940c32f Add Test-OPNSenseThreading cmdlet to exported cmdlets (v2025.04.15.1740) 2025-04-15 17:41:32 -04:00
GraceSolutions 4eb68f76b7 Add test cmdlet for diagnosing threading issues (v2025.04.15.1714) 2025-04-15 17:15:41 -04:00
GraceSolutions 09de38898d Fix threading issues in PowerShell cmdlets (v2025.04.15.1543) 2025-04-15 16:50:35 -04:00
GraceSolutions 570860bdc2 Fixed more threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:58:23 -04:00
GraceSolutions 29b83fbf16 Fixed more threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:53:47 -04:00
GraceSolutions 68fcec516e Fixed more threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:49:33 -04:00
GraceSolutions 04b0fd5550 Fixed additional threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:45:29 -04:00
GraceSolutions 2b31bf23a9 Fixed more threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:34:43 -04:00
GraceSolutions 9c4d3f2eb3 Fixed threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:29:12 -04:00
GraceSolutions edb95d1d4a Fixed threading issues in PowerShell cmdlets to ensure WriteObject and WriteError are only called from the main thread 2025-04-15 12:17:09 -04:00
GraceSolutions 013f1ba4a9 Added comprehensive cmdlet documentation and updated module version to 2025.04.15.1033 2025-04-15 10:34:20 -04:00
GraceSolutions 3936e6bb5d Comment out DotNetFrameworkVersion in PSD1 files 2025-04-15 09:29:47 -04:00
GraceSolutions 7535135bfd Fix threading issue in cmdlets
- Fixed threading issue in cmdlets that was causing 'WriteObject and WriteError methods cannot be called from outside the overrides' error
- Changed module structure to use DLL as root module instead of nested module
- Updated configuration cmdlets to properly handle async operations
2025-04-15 09:24:51 -04:00
GraceSolutions 68e6819131 Update configuration management cmdlets
- Added Get-OPNSenseConfig cmdlet that retrieves the OPNSense configuration as an XML document
- Updated Restore-OPNSenseConfig to accept an XML document from the pipeline or as a parameter
- Changed Export-OPNSenseConfig and Import-OPNSenseConfig to use System.IO.FileInfo for the Path parameter
- Removed Backup-OPNSenseConfig cmdlet (use Get-OPNSenseConfig instead)
- Updated documentation and examples
2025-04-15 08:53:09 -04:00
GraceSolutions c423cca25a Rename Upgrade-OPNSenseFirmware to Start-OPNSenseFirmwareUpgrade to resolve cmdlet name conflict 2025-04-15 07:40:23 -04:00
GraceSolutions 91dc1a1f17 Fix cmdlet name conflict by renaming Upgrade-OPNSenseFirmware to Start-OPNSenseFirmwareUpgrade 2025-04-15 01:34:55 -04:00
GraceSolutions 7476e03319 Update PSM1 files to use Add-Type instead of Assembly.Load 2025-04-15 01:04:29 -04:00
GraceSolutions 7a2331bf74 Update Create-Release.ps1 to test module import 2025-04-15 00:53:57 -04:00
GraceSolutions 4e137e927e Update cmdlet names in PSD1 files to use proper PowerShell verb-noun format 2025-04-15 00:53:05 -04:00
GraceSolutions 412f46ec8d Update PSM1 file to properly load assemblies and let PowerShell handle cmdlet export 2025-04-15 00:44:55 -04:00
GraceSolutions 2916619bf3 Update documentation to mention the release script 2025-04-14 23:37:52 -04:00
GraceSolutions ad693cedcd Add script to create releases and clean up old zip files 2025-04-14 23:36:50 -04:00
GraceSolutions ab0c75ab85 Add release notes for v2025.04.14.2340 2025-04-14 23:32:47 -04:00
GraceSolutions ef21e5d359 Update version to 2025.04.14.2340 2025-04-14 23:31:25 -04:00
GraceSolutions fa5c666cbd Update cmdlet list in PSD1 files to include all cmdlets 2025-04-14 23:27:46 -04:00
GraceSolutions d5fe842cb7 Update version to 2025.04.14.2320 2025-04-14 23:21:56 -04:00
GraceSolutions 52a422d6cc Improve PSM1 file: use = for assignment and provide more detailed verbose output 2025-04-14 23:20:15 -04:00
GraceSolutions ccfb37aaac Update Tailscale-Integration.md to include Connect-OPNSenseTailscale and Disconnect-OPNSenseTailscale cmdlets 2025-04-14 23:15:51 -04:00
GraceSolutions 28546595bd Update Visual-Studio-Solution.md to reflect current project structure 2025-04-14 23:12:54 -04:00
GraceSolutions 08e21843e0 Clean up repository: remove GitHub workflow, update .gitignore, remove unused files, update module structure 2025-04-14 23:07:22 -04:00
GraceSolutions bfbc031a76 Fix warnings, update version format, organize DLLs in subfolder, and use System.Reflection.Assembly::LoadBytes 2025-04-14 22:57:09 -04:00
272 changed files with 19631 additions and 4426 deletions
-126
View File
@@ -1,126 +0,0 @@
name: Build and Release
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/**'
- '!.github/workflows/build-and-release.yml'
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
release:
description: 'Create a release'
required: false
default: false
type: boolean
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Setup PowerShell
uses: actions/setup-powershell@v1
with:
powershell-version: '7.2'
- name: Restore dependencies
run: dotnet restore src/PSOPNSenseAPI.sln
- name: Run tests
run: pwsh -Command "./build/test.ps1 -Configuration Release"
- name: Build and package
run: |
pwsh -Command "./build/build-release.ps1 -Clean -Package"
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: PSOPNSenseAPI
path: output/PSOPNSenseAPI/
- name: Upload package artifacts
uses: actions/upload-artifact@v3
with:
name: PSOPNSenseAPI-Package
path: packages/*.zip
release:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event.inputs.release == 'true'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PowerShell
uses: actions/setup-powershell@v1
with:
powershell-version: '7.2'
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: PSOPNSenseAPI
path: output/PSOPNSenseAPI/
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: PSOPNSenseAPI-Package
path: packages/
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = Get-Date -Format "yyyy.MM.dd.HHmm"
# Update version in project file
$projectFile = "src/PSOPNSenseAPI/PSOPNSenseAPI.csproj"
$projectXml = [xml](Get-Content $projectFile)
$versionNode = $projectXml.Project.PropertyGroup.Version
$versionNode.InnerText = $version
$projectXml.Save($projectFile)
# Update version in module manifest
$manifestFile = "PSOPNSenseAPI/PSOPNSenseAPI.psd1"
$manifestContent = Get-Content -Path $manifestFile -Raw
$manifestContent = $manifestContent -replace "ModuleVersion\s*=\s*['`"].*['`"]", "ModuleVersion = '$version'"
Set-Content -Path $manifestFile -Value $manifestContent
# Commit changes
git add $projectFile
git add $manifestFile
git commit -m "Release version $version [skip ci]"
git push
# Create release
$packagePath = Get-ChildItem -Path "packages/*.zip" | Select-Object -First 1 -ExpandProperty FullName
gh release create "v$version" `
--title "Release v$version" `
--notes "Release version $version - $(Get-Date -Format 'yyyy-MM-dd')" `
$packagePath
shell: pwsh
+3
View File
@@ -1,3 +1,6 @@
.vs/
bin/
obj/
*.zip
output/*.zip
release/
+15 -1
View File
@@ -5,7 +5,21 @@ All notable changes to the PSOPNSenseAPI module will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [2025.04.15.1143] - 2025-04-15
### Added
- Added `Get-OPNSenseConfig` cmdlet that retrieves the OPNSense configuration as an XML document
### Changed
- Renamed `Upgrade-OPNSenseFirmware` to `Start-OPNSenseFirmwareUpgrade` to resolve cmdlet name conflict
- Updated `Restore-OPNSenseConfig` to accept an XML document from the pipeline or as a parameter
- Changed `Export-OPNSenseConfig` and `Import-OPNSenseConfig` to use System.IO.FileInfo for the Path parameter
- Added unit tests for firmware management cmdlets
- Fixed threading issue in cmdlets that was causing "WriteObject and WriteError methods cannot be called from outside the overrides" error
- Changed module structure to use DLL as root module instead of nested module
### Removed
- Removed `Backup-OPNSenseConfig` cmdlet (use `Get-OPNSenseConfig` instead)
## [0.6.0] - 2025-04-14
-3
View File
@@ -1,3 +0,0 @@
# This file is intentionally left empty.
# The module functionality is provided by the binary module (DLL).
# This file exists to allow for future PowerShell script functions if needed.
+8 -3
View File
@@ -135,12 +135,17 @@ Invoke-OPNSenseNetworkCalculation -Network "10.0.0.0/24" -Operation SupernetSumm
# Firmware management
Update-OPNSenseFirmware -Wait
# Major firmware upgrade
Start-OPNSenseFirmwareUpgrade -Wait -Timeout 1200
# Reboot firewall
Restart-OPNSenseFirewall -Wait -Timeout 300
# Backup and restore configuration
Backup-OPNSenseConfig -Filename "pre-upgrade-backup"
Export-OPNSenseConfig -Path "C:\Backups\opnsense-config.xml"
# Configuration management
Get-OPNSenseConfig | Restore-OPNSenseConfig -Force # Get and restore configuration in one line
$config = Get-OPNSenseConfig # Get configuration as XML document
Export-OPNSenseConfig -Path (New-Object System.IO.FileInfo "C:\Backups\opnsense-config.xml")
Import-OPNSenseConfig -Path (New-Object System.IO.FileInfo "C:\Backups\opnsense-config.xml") -Force
```
## Documentation
+43
View File
@@ -0,0 +1,43 @@
# Release v2025.04.14.2340
## What's New
### Added
- Port forwarding management (Get, New, Set, Remove)
- Added unit tests for interface management
- Improved XML documentation for all classes and methods
### Changed
- Updated IPNetwork2 library from version 2.6.618 to 3.1.764
- Updated code to use the new namespace (System.Net) for IPNetwork2
- Added support for .NET 8.0 and .NET 9.0
- Made OPNSenseApiClient more testable by introducing an interface
- Fixed warnings in test project
- Updated version format to use datetime (yyyy.MM.dd.HHmm)
- Organized DLLs in a subfolder for neatness
- Used System.Reflection.Assembly::LoadBytes to avoid file lock issues
- Removed GitHub workflow
- Updated documentation for Tailscale integration
- Updated Visual Studio solution documentation
- Updated PSD1 files to include all cmdlets
## Installation
1. Download the release from the GitHub releases page: https://github.com/freedbygrace/PSOPNSenseAPI/releases/tag/v2025.04.14.2340
2. Extract the zip file to a folder in your PowerShell module path
3. Import the module: `Import-Module PSOPNSenseAPI`
## Usage
```powershell
# Connect to the OPNSense firewall
Connect-OPNSense -Server "https://firewall.example.com" -ApiKey "your_api_key" -ApiSecret "your_api_secret" -SkipCertificateCheck
# Get the interfaces
Get-OPNSenseInterface
# Disconnect from the firewall
Disconnect-OPNSense
```
For more examples, see the documentation in the `docs` folder.
+87 -8
View File
@@ -6,6 +6,8 @@ This component provides cmdlets for managing Tailscale VPN on OPNSense firewalls
The Tailscale Integration component allows you to install, configure, and manage Tailscale VPN on OPNSense firewalls. It provides cmdlets for enabling Tailscale, configuring subnet routes, and managing the Tailscale connection.
The module will automatically install the Tailscale plugin if it doesn't exist, making it easy to set up Tailscale on a new OPNSense firewall.
## Cmdlets
### Get-OPNSenseTailscaleStatus
@@ -138,6 +140,53 @@ Apply-OPNSenseTailscaleChanges
Apply-OPNSenseTailscaleChanges -Force
```
### Connect-OPNSenseTailscale
Connects to the Tailscale network using an authentication key.
#### Parameters
- **AuthKey** - The Tailscale authentication key.
- **InstallIfMissing** - Installs the Tailscale plugin if it's not already installed.
- **EnableIfDisabled** - Enables Tailscale if it's disabled.
- **StartIfStopped** - Starts the Tailscale service if it's stopped.
- **SubnetRoutes** - The subnet routes to advertise to Tailscale.
- **AdvertiseRoutes** - Whether to advertise routes to Tailscale.
- **Force** - Suppresses the confirmation prompt.
- **PassThru** - Returns the Tailscale status.
#### Examples
```powershell
# Connect to Tailscale with an auth key
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456"
# Connect to Tailscale with automatic installation and enablement
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -InstallIfMissing -EnableIfDisabled -StartIfStopped
# Connect to Tailscale and advertise subnet routes
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -SubnetRoutes "192.168.1.0/24","10.0.0.0/8" -AdvertiseRoutes
```
### Disconnect-OPNSenseTailscale
Disconnects from the Tailscale network.
#### Parameters
- **Force** - Suppresses the confirmation prompt.
- **PassThru** - Returns the Tailscale status.
#### Examples
```powershell
# Disconnect from Tailscale
Disconnect-OPNSenseTailscale
# Disconnect from Tailscale without confirmation
Disconnect-OPNSenseTailscale -Force
```
## Common Scenarios
### Installing and Configuring Tailscale
@@ -159,6 +208,19 @@ Apply-OPNSenseTailscaleChanges -Force
Disconnect-OPNSense
```
### Simplified Installation and Connection
```powershell
# Connect to the OPNSense firewall
Connect-OPNSense -Server "https://firewall.example.com" -ApiKey "your_api_key" -ApiSecret "your_api_secret" -SkipCertificateCheck
# Connect to Tailscale with automatic installation and enablement
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -InstallIfMissing -EnableIfDisabled -StartIfStopped -Force
# Disconnect from the firewall
Disconnect-OPNSense
```
### Configuring Tailscale as a Subnet Router
```powershell
@@ -177,14 +239,8 @@ foreach ($interface in $interfaces) {
}
}
# Join the subnets with commas
$advertisedRoutes = $subnets -join ","
# Enable Tailscale with route advertisement
Enable-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -AdvertiseRoutes $advertisedRoutes -Force
# Apply the changes
Apply-OPNSenseTailscaleChanges -Force
# Connect to Tailscale with subnet route advertisement
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -SubnetRoutes $subnets -AdvertiseRoutes -InstallIfMissing -Force
# Disconnect from the firewall
Disconnect-OPNSense
@@ -206,6 +262,26 @@ Apply-OPNSenseTailscaleChanges -Force
Disconnect-OPNSense
```
### Connecting and Disconnecting from Tailscale
```powershell
# Connect to the OPNSense firewall
Connect-OPNSense -Server "https://firewall.example.com" -ApiKey "your_api_key" -ApiSecret "your_api_secret" -SkipCertificateCheck
# Connect to Tailscale
Connect-OPNSenseTailscale -AuthKey "tskey-auth-abcdef123456" -InstallIfMissing -EnableIfDisabled -StartIfStopped -Force
# Get Tailscale status
$status = Get-OPNSenseTailscaleStatus
Write-Output "Tailscale Status: $($status.Status)"
# Disconnect from Tailscale
Disconnect-OPNSenseTailscale -Force
# Disconnect from the firewall
Disconnect-OPNSense
```
### Updating Tailscale Routes
```powershell
@@ -253,6 +329,7 @@ Disconnect-OPNSense
- Tailscale requires the Tailscale plugin to be installed on the OPNSense firewall.
- The `Install-OPNSenseTailscale` cmdlet will install the plugin if it's not already installed.
- The `Connect-OPNSenseTailscale` cmdlet can automatically install the plugin, enable Tailscale, and start the service with the `-InstallIfMissing`, `-EnableIfDisabled`, and `-StartIfStopped` parameters.
- Tailscale authentication keys can be generated from the Tailscale admin console.
- Authentication keys are single-use and expire after a short period.
- When advertising routes, ensure that the routes are valid and do not overlap with Tailscale's internal routes.
@@ -261,3 +338,5 @@ Disconnect-OPNSense
- The `ExitNode` option allows other Tailscale nodes to use the OPNSense firewall as an internet gateway.
- Changes to Tailscale settings are not applied until you call `Apply-OPNSenseTailscaleChanges`.
- Consider using the `-PassThru` parameter when updating Tailscale settings to verify the changes.
- The `Connect-OPNSenseTailscale` cmdlet combines multiple steps (installation, enablement, and connection) into a single command.
- The `Disconnect-OPNSenseTailscale` cmdlet disconnects from the Tailscale network but does not disable Tailscale.
+45 -10
View File
@@ -11,6 +11,7 @@ The PSOPNSenseAPI solution is a Visual Studio solution that contains the source
The solution contains the following projects:
- **PSOPNSenseAPI**: The main project containing the PowerShell module code.
- **PSOPNSenseAPI.Tests**: The test project containing unit tests for the PowerShell module.
## Opening the Solution
@@ -56,19 +57,19 @@ If you encounter issues with the IPNetwork2 library, here are some common troubl
1. **Check the reference**: Ensure that the IPNetwork2 package is properly referenced in the project file.
```xml
<PackageReference Include="IPNetwork2" Version="2.6.618" />
<PackageReference Include="IPNetwork2" Version="3.1.764" />
```
2. **Verify the namespace**: The correct namespace for IPNetwork2 is `System.Net.IPNetwork`.
2. **Verify the namespace**: The correct namespace for IPNetwork2 is `System.Net`.
```csharp
using System.Net.IPNetwork;
using System.Net;
```
3. **Check the class name**: The main class in IPNetwork2 is `IPNetwork`, not `IPNetwork2`.
```csharp
// Correct usage
System.Net.IPNetwork.IPNetwork network = System.Net.IPNetwork.IPNetwork.Parse("192.168.1.0/24");
System.Net.IPNetwork network = System.Net.IPNetwork.Parse("192.168.1.0/24");
// Incorrect usage
IPNetwork2 network = IPNetwork2.Parse("192.168.1.0/24");
```
@@ -100,7 +101,7 @@ When adding new features to the solution:
2. Implement service classes in the `Services` directory
3. Create PowerShell cmdlets in the `Cmdlets` directory
4. Update the module manifest (`PSOPNSenseAPI.psd1`) to export the new cmdlets
5. Add tests for the new features
5. Add tests for the new features in the `PSOPNSenseAPI.Tests` project
6. Update documentation
## Testing
@@ -112,9 +113,24 @@ The solution includes unit tests that can be run from Visual Studio using the Te
.\build\test.ps1
```
## Continuous Integration
## Release Process
The project uses GitHub Actions for continuous integration. The CI workflow builds and tests the solution on every push to the main branch.
The project includes a script to automate the release process. To create a new release:
1. Run the `scripts\Create-Release.ps1` script
2. Follow the instructions to create a GitHub release
The script will:
1. Update the version in the project file and module manifest to the current date and time (yyyy.MM.dd.HHmm)
2. Build the solution in Release mode
3. Copy the DLLs to the output folder
4. Create a zip file of the module
5. Clean up old zip files, keeping only the latest one
6. Commit and push the changes
7. Create a release note file
After running the script, you'll need to manually create a GitHub release and attach the zip file.
## Dependencies
@@ -123,10 +139,29 @@ The solution has the following dependencies:
- PowerShellStandard.Library (5.1.1)
- Newtonsoft.Json (13.0.3)
- System.Net.Http (4.3.4)
- IPNetwork2 (2.6.618)
- IPNetwork2 (3.1.764)
## Notes
- The solution is configured to target both .NET Framework 4.7.2 and .NET Standard 2.0 to support both Windows PowerShell 5.1 and PowerShell 7+.
- The module uses a versioning scheme of `yyyy.MM.dd.HHmm` for releases, which is automatically generated during the build process.
- The module uses a versioning scheme of `yyyy.MM.dd.HHmm` for releases.
- The solution includes XML documentation comments that are used to generate help content for the PowerShell cmdlets.
- The module uses System.Reflection.Assembly::LoadBytes to load DLLs to avoid file lock issues.
- DLLs are organized in a lib subfolder for neatness.
## Module Structure
The module has the following structure:
```
PSOPNSenseAPI/
├── lib/ # DLL files
│ ├── Newtonsoft.Json.dll
│ ├── PSOPNSenseAPI.dll
│ ├── System.Net.IPNetwork.dll
│ └── ...
├── PSOPNSenseAPI.psd1 # Module manifest
└── PSOPNSenseAPI.psm1 # Module script that loads DLLs
```
The PSM1 file uses System.Reflection.Assembly::LoadBytes to load the DLLs from the lib folder, which avoids file lock issues that can occur when PowerShell loads DLLs directly.
@@ -0,0 +1,79 @@
# Apply-OPNSenseFirewallChanges
## SYNOPSIS
Applies pending firewall changes on an OPNSense firewall.
## SYNTAX
```
Apply-OPNSenseFirewallChanges [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Apply-OPNSenseFirewallChanges cmdlet applies pending firewall changes on an OPNSense firewall. This is required after making changes to firewall rules.
## EXAMPLES
### Example 1: Apply firewall changes
```powershell
Apply-OPNSenseFirewallChanges
```
This example applies all pending firewall changes.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
This cmdlet should be called after making changes to firewall rules to apply the changes.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
+126
View File
@@ -0,0 +1,126 @@
# Connect-OPNSense
## SYNOPSIS
Connects to an OPNSense firewall.
## SYNTAX
```
Connect-OPNSense -Server <String> -ApiKey <String> -ApiSecret <String> [-SkipCertificateCheck] [-Force]
```
## DESCRIPTION
The Connect-OPNSense cmdlet establishes a connection to an OPNSense firewall using the API.
This cmdlet must be called before using any other cmdlets in the module.
## EXAMPLES
### Example 1: Connect to an OPNSense firewall
```powershell
Connect-OPNSense -Server "https://firewall.example.com" -ApiKey "your_api_key" -ApiSecret "your_api_secret"
```
This example connects to an OPNSense firewall at the specified URL using the provided API credentials.
### Example 2: Connect to an OPNSense firewall with certificate validation disabled
```powershell
Connect-OPNSense -Server "https://firewall.example.com" -ApiKey "your_api_key" -ApiSecret "your_api_secret" -SkipCertificateCheck
```
This example connects to an OPNSense firewall and skips SSL certificate validation.
## PARAMETERS
### -Server
The URL of the OPNSense firewall.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ApiKey
The API key for authentication.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ApiSecret
The API secret for authentication.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SkipCertificateCheck
Skips SSL certificate validation.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Force
Forces a reconnection if already connected.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
You must have API access enabled on your OPNSense firewall and have created an API key and secret.
## RELATED LINKS
[Disconnect-OPNSense](Disconnect-OPNSense.md)
[Get-OPNSenseConnection](Get-OPNSenseConnection.md)
+102
View File
@@ -0,0 +1,102 @@
# Disable-OPNSenseCronJob
## SYNOPSIS
Disables a cron job on an OPNSense firewall.
## SYNTAX
```
Disable-OPNSenseCronJob -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Disable-OPNSenseCronJob cmdlet disables a cron job on an OPNSense firewall without removing it.
## EXAMPLES
### Example 1: Disable a cron job
```powershell
Disable-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example disables the cron job with the specified UUID.
### Example 2: Disable a cron job with confirmation
```powershell
Disable-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before disabling the cron job.
## PARAMETERS
### -UUID
The UUID of the cron job to disable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a cron job to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
This cmdlet is a shorthand for `Set-OPNSenseCronJob -UUID <UUID> -Enabled $false`.
Disabling a cron job does not remove it from the system, but prevents it from running.
## RELATED LINKS
[Get-OPNSenseCronJob](Get-OPNSenseCronJob.md)
[New-OPNSenseCronJob](New-OPNSenseCronJob.md)
[Set-OPNSenseCronJob](Set-OPNSenseCronJob.md)
[Remove-OPNSenseCronJob](Remove-OPNSenseCronJob.md)
[Enable-OPNSenseCronJob](Enable-OPNSenseCronJob.md)
@@ -0,0 +1,95 @@
# Disable-OPNSenseFirewallRule
## SYNOPSIS
Disables a firewall rule on an OPNSense firewall.
## SYNTAX
```
Disable-OPNSenseFirewallRule -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Disable-OPNSenseFirewallRule cmdlet disables an enabled firewall rule on an OPNSense firewall.
## EXAMPLES
### Example 1: Disable a firewall rule
```powershell
Disable-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example disables the firewall rule with the specified UUID.
## PARAMETERS
### -UUID
The UUID of the firewall rule to disable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a firewall rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After disabling firewall rules, you need to apply the changes using Apply-OPNSenseFirewallChanges.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+102
View File
@@ -0,0 +1,102 @@
# Disable-OPNSensePlugin
## SYNOPSIS
Disables a plugin on an OPNSense firewall.
## SYNTAX
```
Disable-OPNSensePlugin -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Disable-OPNSensePlugin cmdlet disables a plugin on an OPNSense firewall without uninstalling it.
## EXAMPLES
### Example 1: Disable a plugin
```powershell
Disable-OPNSensePlugin -Name "os-acme-client"
```
This example disables the plugin with the name "os-acme-client" on the OPNSense firewall.
### Example 2: Disable a plugin with confirmation
```powershell
Disable-OPNSensePlugin -Name "os-theme-cicada" -Confirm
```
This example prompts for confirmation before disabling the plugin.
## PARAMETERS
### -Name
The name of the plugin to disable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the plugin name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Disabling a plugin does not remove it from the system, but prevents it from being used.
Disabling a plugin may require a reboot of the firewall for the changes to take effect.
Some plugins may have dependencies that need to be disabled first.
## RELATED LINKS
[Get-OPNSensePlugin](Get-OPNSensePlugin.md)
[Install-OPNSensePlugin](Install-OPNSensePlugin.md)
[Uninstall-OPNSensePlugin](Uninstall-OPNSensePlugin.md)
[Enable-OPNSensePlugin](Enable-OPNSensePlugin.md)
+86
View File
@@ -0,0 +1,86 @@
# Disable-OPNSenseTailscale
## SYNOPSIS
Disables Tailscale on an OPNSense firewall.
## SYNTAX
```
Disable-OPNSenseTailscale [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Disable-OPNSenseTailscale cmdlet disables the Tailscale service on an OPNSense firewall.
## EXAMPLES
### Example 1: Disable Tailscale
```powershell
Disable-OPNSenseTailscale
```
This example disables the Tailscale service on the OPNSense firewall.
### Example 2: Disable Tailscale with confirmation
```powershell
Disable-OPNSenseTailscale -Confirm
```
This example prompts for confirmation before disabling the Tailscale service.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The Tailscale plugin must be installed on the OPNSense firewall.
Disabling Tailscale will disconnect the firewall from the Tailscale network.
## RELATED LINKS
[Enable-OPNSenseTailscale](Enable-OPNSenseTailscale.md)
[Get-OPNSenseTailscaleStatus](Get-OPNSenseTailscaleStatus.md)
[Get-OPNSenseTailscaleConfig](Get-OPNSenseTailscaleConfig.md)
[Set-OPNSenseTailscaleConfig](Set-OPNSenseTailscaleConfig.md)
[Install-OPNSenseTailscale](Install-OPNSenseTailscale.md)
+43
View File
@@ -0,0 +1,43 @@
# Disconnect-OPNSense
## SYNOPSIS
Disconnects from an OPNSense firewall.
## SYNTAX
```
Disconnect-OPNSense
```
## DESCRIPTION
The Disconnect-OPNSense cmdlet terminates the connection to an OPNSense firewall.
## EXAMPLES
### Example 1: Disconnect from an OPNSense firewall
```powershell
Disconnect-OPNSense
```
This example disconnects from the currently connected OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
This cmdlet releases resources used by the connection to the OPNSense firewall.
## RELATED LINKS
[Connect-OPNSense](Connect-OPNSense.md)
[Get-OPNSenseConnection](Get-OPNSenseConnection.md)
+101
View File
@@ -0,0 +1,101 @@
# Enable-OPNSenseCronJob
## SYNOPSIS
Enables a cron job on an OPNSense firewall.
## SYNTAX
```
Enable-OPNSenseCronJob -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Enable-OPNSenseCronJob cmdlet enables a previously disabled cron job on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable a cron job
```powershell
Enable-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example enables the cron job with the specified UUID.
### Example 2: Enable a cron job with confirmation
```powershell
Enable-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before enabling the cron job.
## PARAMETERS
### -UUID
The UUID of the cron job to enable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a cron job to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
This cmdlet is a shorthand for `Set-OPNSenseCronJob -UUID <UUID> -Enabled $true`.
## RELATED LINKS
[Get-OPNSenseCronJob](Get-OPNSenseCronJob.md)
[New-OPNSenseCronJob](New-OPNSenseCronJob.md)
[Set-OPNSenseCronJob](Set-OPNSenseCronJob.md)
[Remove-OPNSenseCronJob](Remove-OPNSenseCronJob.md)
[Disable-OPNSenseCronJob](Disable-OPNSenseCronJob.md)
@@ -0,0 +1,95 @@
# Enable-OPNSenseFirewallRule
## SYNOPSIS
Enables a firewall rule on an OPNSense firewall.
## SYNTAX
```
Enable-OPNSenseFirewallRule -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Enable-OPNSenseFirewallRule cmdlet enables a disabled firewall rule on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable a firewall rule
```powershell
Enable-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example enables the firewall rule with the specified UUID.
## PARAMETERS
### -UUID
The UUID of the firewall rule to enable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a firewall rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After enabling firewall rules, you need to apply the changes using Apply-OPNSenseFirewallChanges.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+101
View File
@@ -0,0 +1,101 @@
# Enable-OPNSensePlugin
## SYNOPSIS
Enables a plugin on an OPNSense firewall.
## SYNTAX
```
Enable-OPNSensePlugin -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Enable-OPNSensePlugin cmdlet enables a previously disabled plugin on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable a plugin
```powershell
Enable-OPNSensePlugin -Name "os-acme-client"
```
This example enables the plugin with the name "os-acme-client" on the OPNSense firewall.
### Example 2: Enable a plugin with confirmation
```powershell
Enable-OPNSensePlugin -Name "os-theme-cicada" -Confirm
```
This example prompts for confirmation before enabling the plugin.
## PARAMETERS
### -Name
The name of the plugin to enable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the plugin name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The plugin must be installed before it can be enabled.
Enabling a plugin may require a reboot of the firewall for the changes to take effect.
## RELATED LINKS
[Get-OPNSensePlugin](Get-OPNSensePlugin.md)
[Install-OPNSensePlugin](Install-OPNSensePlugin.md)
[Uninstall-OPNSensePlugin](Uninstall-OPNSensePlugin.md)
[Disable-OPNSensePlugin](Disable-OPNSensePlugin.md)
+86
View File
@@ -0,0 +1,86 @@
# Enable-OPNSenseTailscale
## SYNOPSIS
Enables Tailscale on an OPNSense firewall.
## SYNTAX
```
Enable-OPNSenseTailscale [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Enable-OPNSenseTailscale cmdlet enables the Tailscale service on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable Tailscale
```powershell
Enable-OPNSenseTailscale
```
This example enables the Tailscale service on the OPNSense firewall.
### Example 2: Enable Tailscale with confirmation
```powershell
Enable-OPNSenseTailscale -Confirm
```
This example prompts for confirmation before enabling the Tailscale service.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The Tailscale plugin must be installed on the OPNSense firewall.
Tailscale must be properly configured before enabling it. Use Set-OPNSenseTailscaleConfig to configure Tailscale.
## RELATED LINKS
[Disable-OPNSenseTailscale](Disable-OPNSenseTailscale.md)
[Get-OPNSenseTailscaleStatus](Get-OPNSenseTailscaleStatus.md)
[Get-OPNSenseTailscaleConfig](Get-OPNSenseTailscaleConfig.md)
[Set-OPNSenseTailscaleConfig](Set-OPNSenseTailscaleConfig.md)
[Install-OPNSenseTailscale](Install-OPNSenseTailscale.md)
+76
View File
@@ -0,0 +1,76 @@
# Export-OPNSenseConfig
## SYNOPSIS
Exports the OPNSense firewall configuration.
## SYNTAX
```
Export-OPNSenseConfig -Path <FileInfo> [-Force]
```
## DESCRIPTION
The Export-OPNSenseConfig cmdlet exports the OPNSense firewall configuration to a file.
## EXAMPLES
### Example 1: Export the configuration to a file
```powershell
$path = New-Object System.IO.FileInfo "C:\Backups\opnsense-config.xml"
Export-OPNSenseConfig -Path $path
```
This example exports the OPNSense firewall configuration to a file.
## PARAMETERS
### -Path
The path to save the configuration file. Must be a FileInfo object with an .xml extension.
```yaml
Type: FileInfo
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Force
Overwrites the file if it exists.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
If the directory specified in the Path parameter does not exist, it will be created.
## RELATED LINKS
[Get-OPNSenseConfig](Get-OPNSenseConfig.md)
[Import-OPNSenseConfig](Import-OPNSenseConfig.md)
[Restore-OPNSenseConfig](Restore-OPNSenseConfig.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseAlias
## SYNOPSIS
Gets aliases from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseAlias [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSenseAlias cmdlet retrieves aliases from an OPNSense firewall. You can retrieve all aliases or a specific alias by name.
## EXAMPLES
### Example 1: Get all aliases
```powershell
Get-OPNSenseAlias
```
This example retrieves all aliases from the OPNSense firewall.
### Example 2: Get a specific alias
```powershell
Get-OPNSenseAlias -Name "LAN_HOSTS"
```
This example retrieves the alias with the name "LAN_HOSTS" from the OPNSense firewall.
## PARAMETERS
### -Name
The name of the alias to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the aliases, including information such as name, type, content, and description.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseAlias](New-OPNSenseAlias.md)
[Set-OPNSenseAlias](Set-OPNSenseAlias.md)
[Remove-OPNSenseAlias](Remove-OPNSenseAlias.md)
+52
View File
@@ -0,0 +1,52 @@
# Get-OPNSenseConfig
## SYNOPSIS
Gets the OPNSense firewall configuration as an XML document.
## SYNTAX
```
Get-OPNSenseConfig
```
## DESCRIPTION
The Get-OPNSenseConfig cmdlet retrieves the OPNSense firewall configuration and returns it as an XML document.
## EXAMPLES
### Example 1: Get the configuration as an XML document
```powershell
$config = Get-OPNSenseConfig
```
This example retrieves the OPNSense firewall configuration as an XML document.
### Example 2: Get the configuration and pipe it to Restore-OPNSenseConfig
```powershell
Get-OPNSenseConfig | Restore-OPNSenseConfig
```
This example retrieves the OPNSense firewall configuration and restores it.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Xml.XmlDocument
The OPNSense configuration as an XML document.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Restore-OPNSenseConfig](Restore-OPNSenseConfig.md)
[Export-OPNSenseConfig](Export-OPNSenseConfig.md)
[Import-OPNSenseConfig](Import-OPNSenseConfig.md)
+44
View File
@@ -0,0 +1,44 @@
# Get-OPNSenseConnection
## SYNOPSIS
Gets information about the current OPNSense connection.
## SYNTAX
```
Get-OPNSenseConnection
```
## DESCRIPTION
The Get-OPNSenseConnection cmdlet retrieves information about the current connection to an OPNSense firewall.
## EXAMPLES
### Example 1: Get connection information
```powershell
Get-OPNSenseConnection
```
This example retrieves information about the current connection to an OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object containing information about the current connection, including the server URL and connection status.
## NOTES
This cmdlet can be used to verify that a connection to an OPNSense firewall has been established.
## RELATED LINKS
[Connect-OPNSense](Connect-OPNSense.md)
[Disconnect-OPNSense](Disconnect-OPNSense.md)
+69
View File
@@ -0,0 +1,69 @@
# Get-OPNSenseCronJob
## SYNOPSIS
Gets cron jobs from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseCronJob [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseCronJob cmdlet retrieves cron jobs from an OPNSense firewall. You can retrieve all cron jobs or a specific cron job by UUID.
## EXAMPLES
### Example 1: Get all cron jobs
```powershell
Get-OPNSenseCronJob
```
This example retrieves all cron jobs from the OPNSense firewall.
### Example 2: Get a specific cron job
```powershell
Get-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific cron job by its UUID.
## PARAMETERS
### -UUID
The UUID of the cron job to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the cron jobs.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseCronJob](New-OPNSenseCronJob.md)
[Set-OPNSenseCronJob](Set-OPNSenseCronJob.md)
[Remove-OPNSenseCronJob](Remove-OPNSenseCronJob.md)
[Enable-OPNSenseCronJob](Enable-OPNSenseCronJob.md)
[Disable-OPNSenseCronJob](Disable-OPNSenseCronJob.md)
+115
View File
@@ -0,0 +1,115 @@
# Get-OPNSenseDHCPLease
## SYNOPSIS
Gets DHCP leases from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDHCPLease [[-Interface] <String>] [[-IP] <String>] [[-MAC] <String>]
```
## DESCRIPTION
The Get-OPNSenseDHCPLease cmdlet retrieves DHCP leases from an OPNSense firewall. You can filter leases by interface, IP address, or MAC address.
## EXAMPLES
### Example 1: Get all DHCP leases
```powershell
Get-OPNSenseDHCPLease
```
This example retrieves all DHCP leases from the OPNSense firewall.
### Example 2: Get DHCP leases for a specific interface
```powershell
Get-OPNSenseDHCPLease -Interface "lan"
```
This example retrieves DHCP leases for the LAN interface.
### Example 3: Get a DHCP lease for a specific IP address
```powershell
Get-OPNSenseDHCPLease -IP "192.168.1.100"
```
This example retrieves the DHCP lease for the specified IP address.
### Example 4: Get a DHCP lease for a specific MAC address
```powershell
Get-OPNSenseDHCPLease -MAC "00:11:22:33:44:55"
```
This example retrieves the DHCP lease for the specified MAC address.
## PARAMETERS
### -Interface
The interface for which to retrieve DHCP leases.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IP
The IP address for which to retrieve a DHCP lease.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MAC
The MAC address for which to retrieve a DHCP lease.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DHCP leases.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
+91
View File
@@ -0,0 +1,91 @@
# Get-OPNSenseDHCPOption
## SYNOPSIS
Gets DHCP options from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDHCPOption [[-Interface] <String>] [[-Number] <Int32>]
```
## DESCRIPTION
The Get-OPNSenseDHCPOption cmdlet retrieves DHCP options from an OPNSense firewall. You can retrieve all options, options for a specific interface, or a specific option by number.
## EXAMPLES
### Example 1: Get all DHCP options
```powershell
Get-OPNSenseDHCPOption
```
This example retrieves all DHCP options from the OPNSense firewall.
### Example 2: Get DHCP options for a specific interface
```powershell
Get-OPNSenseDHCPOption -Interface "lan"
```
This example retrieves DHCP options for the LAN interface.
### Example 3: Get a specific DHCP option
```powershell
Get-OPNSenseDHCPOption -Number 66
```
This example retrieves DHCP option 66 (TFTP server name) from the OPNSense firewall.
## PARAMETERS
### -Interface
The interface for which to retrieve DHCP options.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Number
The option number to retrieve.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DHCP options.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseDHCPOption](New-OPNSenseDHCPOption.md)
[Set-OPNSenseDHCPOption](Set-OPNSenseDHCPOption.md)
[Remove-OPNSenseDHCPOption](Remove-OPNSenseDHCPOption.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
+71
View File
@@ -0,0 +1,71 @@
# Get-OPNSenseDHCPServer
## SYNOPSIS
Gets DHCP server settings from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDHCPServer [[-Interface] <String>]
```
## DESCRIPTION
The Get-OPNSenseDHCPServer cmdlet retrieves DHCP server settings from an OPNSense firewall. You can retrieve settings for all interfaces or a specific interface.
## EXAMPLES
### Example 1: Get DHCP server settings for all interfaces
```powershell
Get-OPNSenseDHCPServer
```
This example retrieves DHCP server settings for all interfaces from the OPNSense firewall.
### Example 2: Get DHCP server settings for a specific interface
```powershell
Get-OPNSenseDHCPServer -Interface "lan"
```
This example retrieves DHCP server settings for the LAN interface from the OPNSense firewall.
## PARAMETERS
### -Interface
The interface for which to retrieve DHCP server settings.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DHCP server settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
@@ -0,0 +1,93 @@
# Get-OPNSenseDHCPStaticMapping
## SYNOPSIS
Gets DHCP static mappings from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDHCPStaticMapping [[-Interface] <String>] [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseDHCPStaticMapping cmdlet retrieves DHCP static mappings from an OPNSense firewall. You can retrieve all static mappings, mappings for a specific interface, or a specific mapping by UUID.
## EXAMPLES
### Example 1: Get all DHCP static mappings
```powershell
Get-OPNSenseDHCPStaticMapping
```
This example retrieves all DHCP static mappings from the OPNSense firewall.
### Example 2: Get DHCP static mappings for a specific interface
```powershell
Get-OPNSenseDHCPStaticMapping -Interface "lan"
```
This example retrieves DHCP static mappings for the LAN interface.
### Example 3: Get a specific DHCP static mapping
```powershell
Get-OPNSenseDHCPStaticMapping -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific DHCP static mapping by its UUID.
## PARAMETERS
### -Interface
The interface for which to retrieve DHCP static mappings.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -UUID
The UUID of the DHCP static mapping to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DHCP static mappings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
+47
View File
@@ -0,0 +1,47 @@
# Get-OPNSenseDNSForwarding
## SYNOPSIS
Gets DNS forwarding settings from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDNSForwarding
```
## DESCRIPTION
The Get-OPNSenseDNSForwarding cmdlet retrieves DNS forwarding settings from an OPNSense firewall.
## EXAMPLES
### Example 1: Get DNS forwarding settings
```powershell
Get-OPNSenseDNSForwarding
```
This example retrieves the DNS forwarding settings from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the DNS forwarding settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Set-OPNSenseDNSForwarding](Set-OPNSenseDNSForwarding.md)
[Get-OPNSenseDNSForwardingHost](Get-OPNSenseDNSForwardingHost.md)
[New-OPNSenseDNSForwardingHost](New-OPNSenseDNSForwardingHost.md)
[Set-OPNSenseDNSForwardingHost](Set-OPNSenseDNSForwardingHost.md)
[Remove-OPNSenseDNSForwardingHost](Remove-OPNSenseDNSForwardingHost.md)
@@ -0,0 +1,69 @@
# Get-OPNSenseDNSForwardingHost
## SYNOPSIS
Gets DNS forwarding hosts from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDNSForwardingHost [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseDNSForwardingHost cmdlet retrieves DNS forwarding hosts from an OPNSense firewall. You can retrieve all forwarding hosts or a specific forwarding host by UUID.
## EXAMPLES
### Example 1: Get all DNS forwarding hosts
```powershell
Get-OPNSenseDNSForwardingHost
```
This example retrieves all DNS forwarding hosts from the OPNSense firewall.
### Example 2: Get a specific DNS forwarding host
```powershell
Get-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific DNS forwarding host by its UUID.
## PARAMETERS
### -UUID
The UUID of the DNS forwarding host to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DNS forwarding hosts.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseDNSForwardingHost](New-OPNSenseDNSForwardingHost.md)
[Set-OPNSenseDNSForwardingHost](Set-OPNSenseDNSForwardingHost.md)
[Remove-OPNSenseDNSForwardingHost](Remove-OPNSenseDNSForwardingHost.md)
[Get-OPNSenseDNSForwarding](Get-OPNSenseDNSForwarding.md)
[Set-OPNSenseDNSForwarding](Set-OPNSenseDNSForwarding.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseDNSOverride
## SYNOPSIS
Gets DNS overrides from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDNSOverride [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseDNSOverride cmdlet retrieves DNS overrides from an OPNSense firewall. You can retrieve all overrides or a specific override by UUID.
## EXAMPLES
### Example 1: Get all DNS overrides
```powershell
Get-OPNSenseDNSOverride
```
This example retrieves all DNS overrides from the OPNSense firewall.
### Example 2: Get a specific DNS override
```powershell
Get-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific DNS override by its UUID.
## PARAMETERS
### -UUID
The UUID of the DNS override to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the DNS overrides.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseDNSOverride](New-OPNSenseDNSOverride.md)
[Set-OPNSenseDNSOverride](Set-OPNSenseDNSOverride.md)
[Remove-OPNSenseDNSOverride](Remove-OPNSenseDNSOverride.md)
+45
View File
@@ -0,0 +1,45 @@
# Get-OPNSenseDNSServer
## SYNOPSIS
Gets DNS server settings from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseDNSServer
```
## DESCRIPTION
The Get-OPNSenseDNSServer cmdlet retrieves DNS server settings from an OPNSense firewall.
## EXAMPLES
### Example 1: Get DNS server settings
```powershell
Get-OPNSenseDNSServer
```
This example retrieves the DNS server settings from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the DNS server settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Set-OPNSenseDNSServer](Set-OPNSenseDNSServer.md)
[Get-OPNSenseSystemDNS](Get-OPNSenseSystemDNS.md)
[Set-OPNSenseSystemDNS](Set-OPNSenseSystemDNS.md)
+70
View File
@@ -0,0 +1,70 @@
# Get-OPNSenseFirewallRule
## SYNOPSIS
Gets firewall rules from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseFirewallRule [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseFirewallRule cmdlet retrieves firewall rules from an OPNSense firewall. You can retrieve all rules or a specific rule by UUID.
## EXAMPLES
### Example 1: Get all firewall rules
```powershell
Get-OPNSenseFirewallRule
```
This example retrieves all firewall rules from the OPNSense firewall.
### Example 2: Get a specific firewall rule
```powershell
Get-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific firewall rule by its UUID.
## PARAMETERS
### -UUID
The UUID of the firewall rule to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the firewall rules.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+44
View File
@@ -0,0 +1,44 @@
# Get-OPNSenseFirmware
## SYNOPSIS
Gets firmware information from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseFirmware
```
## DESCRIPTION
The Get-OPNSenseFirmware cmdlet retrieves firmware information from an OPNSense firewall, including the current version and available updates.
## EXAMPLES
### Example 1: Get firmware information
```powershell
Get-OPNSenseFirmware
```
This example retrieves firmware information from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the firmware information, including the current version, available updates, and update status.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Update-OPNSenseFirmware](Update-OPNSenseFirmware.md)
[Start-OPNSenseFirmwareUpgrade](Start-OPNSenseFirmwareUpgrade.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseGateway
## SYNOPSIS
Gets gateways from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseGateway [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSenseGateway cmdlet retrieves gateways from an OPNSense firewall. You can retrieve all gateways or a specific gateway by name.
## EXAMPLES
### Example 1: Get all gateways
```powershell
Get-OPNSenseGateway
```
This example retrieves all gateways from the OPNSense firewall.
### Example 2: Get a specific gateway
```powershell
Get-OPNSenseGateway -Name "WAN_GW"
```
This example retrieves the gateway named "WAN_GW" from the OPNSense firewall.
## PARAMETERS
### -Name
The name of the gateway to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the gateways.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseGateway](New-OPNSenseGateway.md)
[Set-OPNSenseGateway](Set-OPNSenseGateway.md)
[Remove-OPNSenseGateway](Remove-OPNSenseGateway.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseInterface
## SYNOPSIS
Gets network interfaces from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseInterface [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSenseInterface cmdlet retrieves network interfaces from an OPNSense firewall. You can retrieve all interfaces or a specific interface by name.
## EXAMPLES
### Example 1: Get all interfaces
```powershell
Get-OPNSenseInterface
```
This example retrieves all network interfaces from the OPNSense firewall.
### Example 2: Get a specific interface
```powershell
Get-OPNSenseInterface -Name "lan"
```
This example retrieves the LAN interface from the OPNSense firewall.
## PARAMETERS
### -Name
The name of the interface to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the network interfaces.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Set-OPNSenseInterface](Set-OPNSenseInterface.md)
[Restart-OPNSenseInterface](Restart-OPNSenseInterface.md)
[Get-OPNSenseInterfaceStatistics](Get-OPNSenseInterfaceStatistics.md)
@@ -0,0 +1,67 @@
# Get-OPNSenseInterfaceStatistics
## SYNOPSIS
Gets statistics for network interfaces on an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseInterfaceStatistics [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSenseInterfaceStatistics cmdlet retrieves statistics for network interfaces on an OPNSense firewall. You can retrieve statistics for all interfaces or a specific interface by name.
## EXAMPLES
### Example 1: Get statistics for all interfaces
```powershell
Get-OPNSenseInterfaceStatistics
```
This example retrieves statistics for all network interfaces on the OPNSense firewall.
### Example 2: Get statistics for a specific interface
```powershell
Get-OPNSenseInterfaceStatistics -Name "lan"
```
This example retrieves statistics for the LAN interface on the OPNSense firewall.
## PARAMETERS
### -Name
The name of the interface to retrieve statistics for.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the interface statistics, including information such as packets sent/received, bytes sent/received, and errors.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Get-OPNSenseInterface](Get-OPNSenseInterface.md)
[Set-OPNSenseInterface](Set-OPNSenseInterface.md)
[Restart-OPNSenseInterface](Restart-OPNSenseInterface.md)
+68
View File
@@ -0,0 +1,68 @@
# Get-OPNSensePlugin
## SYNOPSIS
Gets plugins from an OPNSense firewall.
## SYNTAX
```
Get-OPNSensePlugin [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSensePlugin cmdlet retrieves plugins from an OPNSense firewall. You can retrieve all plugins or a specific plugin by name.
## EXAMPLES
### Example 1: Get all plugins
```powershell
Get-OPNSensePlugin
```
This example retrieves all plugins from the OPNSense firewall.
### Example 2: Get a specific plugin
```powershell
Get-OPNSensePlugin -Name "os-acme-client"
```
This example retrieves the plugin with the name "os-acme-client" from the OPNSense firewall.
## PARAMETERS
### -Name
The name of the plugin to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the plugins, including information such as name, version, and installation status.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Install-OPNSensePlugin](Install-OPNSensePlugin.md)
[Uninstall-OPNSensePlugin](Uninstall-OPNSensePlugin.md)
[Enable-OPNSensePlugin](Enable-OPNSensePlugin.md)
[Disable-OPNSensePlugin](Disable-OPNSensePlugin.md)
@@ -0,0 +1,67 @@
# Get-OPNSensePortForwardingRule
## SYNOPSIS
Gets port forwarding rules from an OPNSense firewall.
## SYNTAX
```
Get-OPNSensePortForwardingRule [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSensePortForwardingRule cmdlet retrieves port forwarding rules from an OPNSense firewall. You can retrieve all rules or a specific rule by UUID.
## EXAMPLES
### Example 1: Get all port forwarding rules
```powershell
Get-OPNSensePortForwardingRule
```
This example retrieves all port forwarding rules from the OPNSense firewall.
### Example 2: Get a specific port forwarding rule
```powershell
Get-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific port forwarding rule by its UUID.
## PARAMETERS
### -UUID
The UUID of the port forwarding rule to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the port forwarding rules.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSensePortForwardingRule](New-OPNSensePortForwardingRule.md)
[Set-OPNSensePortForwardingRule](Set-OPNSensePortForwardingRule.md)
[Remove-OPNSensePortForwardingRule](Remove-OPNSensePortForwardingRule.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseRoute
## SYNOPSIS
Gets static routes from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseRoute [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseRoute cmdlet retrieves static routes from an OPNSense firewall. You can retrieve all routes or a specific route by UUID.
## EXAMPLES
### Example 1: Get all routes
```powershell
Get-OPNSenseRoute
```
This example retrieves all static routes from the OPNSense firewall.
### Example 2: Get a specific route
```powershell
Get-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific static route by its UUID.
## PARAMETERS
### -UUID
The UUID of the route to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the static routes.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseRoute](New-OPNSenseRoute.md)
[Set-OPNSenseRoute](Set-OPNSenseRoute.md)
[Remove-OPNSenseRoute](Remove-OPNSenseRoute.md)
+67
View File
@@ -0,0 +1,67 @@
# Get-OPNSenseService
## SYNOPSIS
Gets services from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseService [[-Name] <String>]
```
## DESCRIPTION
The Get-OPNSenseService cmdlet retrieves services from an OPNSense firewall. You can retrieve all services or a specific service by name.
## EXAMPLES
### Example 1: Get all services
```powershell
Get-OPNSenseService
```
This example retrieves all services from the OPNSense firewall.
### Example 2: Get a specific service
```powershell
Get-OPNSenseService -Name "dhcpd"
```
This example retrieves the DHCP service from the OPNSense firewall.
## PARAMETERS
### -Name
The name of the service to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the services, including information such as name, description, and status.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Start-OPNSenseService](Start-OPNSenseService.md)
[Stop-OPNSenseService](Stop-OPNSenseService.md)
[Restart-OPNSenseService](Restart-OPNSenseService.md)
+45
View File
@@ -0,0 +1,45 @@
# Get-OPNSenseSystemDNS
## SYNOPSIS
Gets system DNS settings from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseSystemDNS
```
## DESCRIPTION
The Get-OPNSenseSystemDNS cmdlet retrieves system DNS settings from an OPNSense firewall, including DNS servers and domain search list.
## EXAMPLES
### Example 1: Get system DNS settings
```powershell
Get-OPNSenseSystemDNS
```
This example retrieves the system DNS settings from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the system DNS settings, including DNS servers and domain search list.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Set-OPNSenseSystemDNS](Set-OPNSenseSystemDNS.md)
[Get-OPNSenseDNSServer](Get-OPNSenseDNSServer.md)
[Set-OPNSenseDNSServer](Set-OPNSenseDNSServer.md)
+45
View File
@@ -0,0 +1,45 @@
# Get-OPNSenseSystemInfo
## SYNOPSIS
Gets system information from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseSystemInfo
```
## DESCRIPTION
The Get-OPNSenseSystemInfo cmdlet retrieves system information from an OPNSense firewall, including version, platform, hardware details, and installed packages.
## EXAMPLES
### Example 1: Get system information
```powershell
Get-OPNSenseSystemInfo
```
This example retrieves system information from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the system information.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Get-OPNSenseSystemStatus](Get-OPNSenseSystemStatus.md)
[Restart-OPNSenseSystem](Restart-OPNSenseSystem.md)
[Stop-OPNSenseSystem](Stop-OPNSenseSystem.md)
+45
View File
@@ -0,0 +1,45 @@
# Get-OPNSenseSystemStatus
## SYNOPSIS
Gets system status information from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseSystemStatus
```
## DESCRIPTION
The Get-OPNSenseSystemStatus cmdlet retrieves system status information from an OPNSense firewall, including CPU usage, memory usage, disk usage, and uptime.
## EXAMPLES
### Example 1: Get system status
```powershell
Get-OPNSenseSystemStatus
```
This example retrieves system status information from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the system status information.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[Get-OPNSenseSystemInfo](Get-OPNSenseSystemInfo.md)
[Restart-OPNSenseSystem](Restart-OPNSenseSystem.md)
[Stop-OPNSenseSystem](Stop-OPNSenseSystem.md)
@@ -0,0 +1,48 @@
# Get-OPNSenseTailscaleConfig
## SYNOPSIS
Gets the Tailscale configuration from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseTailscaleConfig
```
## DESCRIPTION
The Get-OPNSenseTailscaleConfig cmdlet retrieves the Tailscale configuration from an OPNSense firewall, including settings such as authentication key, advertised routes, and exit node configuration.
## EXAMPLES
### Example 1: Get Tailscale configuration
```powershell
Get-OPNSenseTailscaleConfig
```
This example retrieves the Tailscale configuration from the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the Tailscale configuration.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The Tailscale plugin must be installed on the OPNSense firewall.
## RELATED LINKS
[Set-OPNSenseTailscaleConfig](Set-OPNSenseTailscaleConfig.md)
[Enable-OPNSenseTailscale](Enable-OPNSenseTailscale.md)
[Disable-OPNSenseTailscale](Disable-OPNSenseTailscale.md)
[Get-OPNSenseTailscaleStatus](Get-OPNSenseTailscaleStatus.md)
[Install-OPNSenseTailscale](Install-OPNSenseTailscale.md)
@@ -0,0 +1,48 @@
# Get-OPNSenseTailscaleStatus
## SYNOPSIS
Gets the status of Tailscale on an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseTailscaleStatus
```
## DESCRIPTION
The Get-OPNSenseTailscaleStatus cmdlet retrieves the status of Tailscale on an OPNSense firewall, including connection state, node information, and subnet routes.
## EXAMPLES
### Example 1: Get Tailscale status
```powershell
Get-OPNSenseTailscaleStatus
```
This example retrieves the status of Tailscale on the OPNSense firewall.
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the Tailscale status.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The Tailscale plugin must be installed and configured on the OPNSense firewall.
## RELATED LINKS
[Enable-OPNSenseTailscale](Enable-OPNSenseTailscale.md)
[Disable-OPNSenseTailscale](Disable-OPNSenseTailscale.md)
[Set-OPNSenseTailscaleConfig](Set-OPNSenseTailscaleConfig.md)
[Get-OPNSenseTailscaleConfig](Get-OPNSenseTailscaleConfig.md)
[Install-OPNSenseTailscale](Install-OPNSenseTailscale.md)
+68
View File
@@ -0,0 +1,68 @@
# Get-OPNSenseUser
## SYNOPSIS
Gets users from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseUser [[-Username] <String>]
```
## DESCRIPTION
The Get-OPNSenseUser cmdlet retrieves users from an OPNSense firewall. You can retrieve all users or a specific user by username.
## EXAMPLES
### Example 1: Get all users
```powershell
Get-OPNSenseUser
```
This example retrieves all users from the OPNSense firewall.
### Example 2: Get a specific user
```powershell
Get-OPNSenseUser -Username "admin"
```
This example retrieves the user with the username "admin" from the OPNSense firewall.
## PARAMETERS
### -Username
The username of the user to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the users.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
For security reasons, user passwords are not included in the output.
## RELATED LINKS
[New-OPNSenseUser](New-OPNSenseUser.md)
[Set-OPNSenseUser](Set-OPNSenseUser.md)
[Remove-OPNSenseUser](Remove-OPNSenseUser.md)
+68
View File
@@ -0,0 +1,68 @@
# Get-OPNSenseVLAN
## SYNOPSIS
Gets VLANs from an OPNSense firewall.
## SYNTAX
```
Get-OPNSenseVLAN [[-UUID] <String>]
```
## DESCRIPTION
The Get-OPNSenseVLAN cmdlet retrieves VLANs from an OPNSense firewall. You can retrieve all VLANs or a specific VLAN by UUID.
## EXAMPLES
### Example 1: Get all VLANs
```powershell
Get-OPNSenseVLAN
```
This example retrieves all VLANs from the OPNSense firewall.
### Example 2: Get a specific VLAN
```powershell
Get-OPNSenseVLAN -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example retrieves a specific VLAN by its UUID.
## PARAMETERS
### -UUID
The UUID of the VLAN to retrieve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the VLANs.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
## RELATED LINKS
[New-OPNSenseVLAN](New-OPNSenseVLAN.md)
[Set-OPNSenseVLAN](Set-OPNSenseVLAN.md)
[Remove-OPNSenseVLAN](Remove-OPNSenseVLAN.md)
[New-OPNSenseSubnetVLANs](New-OPNSenseSubnetVLANs.md)
+106
View File
@@ -0,0 +1,106 @@
# Import-OPNSenseConfig
## SYNOPSIS
Imports an OPNSense firewall configuration.
## SYNTAX
```
Import-OPNSenseConfig -Path <FileInfo> [-Force] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Import-OPNSenseConfig cmdlet imports an OPNSense firewall configuration from a file.
## EXAMPLES
### Example 1: Import a configuration from a file
```powershell
$path = New-Object System.IO.FileInfo "C:\Backups\opnsense-config.xml"
Import-OPNSenseConfig -Path $path
```
This example imports an OPNSense firewall configuration from a file.
## PARAMETERS
### -Path
The path to the configuration file. Must be a FileInfo object with an .xml extension.
```yaml
Type: FileInfo
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Force
Suppresses the confirmation prompt.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### None
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The firewall will restart after the configuration is imported.
## RELATED LINKS
[Get-OPNSenseConfig](Get-OPNSenseConfig.md)
[Export-OPNSenseConfig](Export-OPNSenseConfig.md)
[Restore-OPNSenseConfig](Restore-OPNSenseConfig.md)
+101
View File
@@ -0,0 +1,101 @@
# Install-OPNSensePlugin
## SYNOPSIS
Installs a plugin on an OPNSense firewall.
## SYNTAX
```
Install-OPNSensePlugin -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Install-OPNSensePlugin cmdlet installs a plugin on an OPNSense firewall.
## EXAMPLES
### Example 1: Install a plugin
```powershell
Install-OPNSensePlugin -Name "os-acme-client"
```
This example installs the plugin with the name "os-acme-client" on the OPNSense firewall.
### Example 2: Install a plugin with confirmation
```powershell
Install-OPNSensePlugin -Name "os-theme-cicada" -Confirm
```
This example prompts for confirmation before installing the plugin.
## PARAMETERS
### -Name
The name of the plugin to install.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the plugin name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Installing plugins may require a reboot of the firewall for the changes to take effect.
Some plugins may have dependencies that need to be installed first.
## RELATED LINKS
[Get-OPNSensePlugin](Get-OPNSensePlugin.md)
[Uninstall-OPNSensePlugin](Uninstall-OPNSensePlugin.md)
[Enable-OPNSensePlugin](Enable-OPNSensePlugin.md)
[Disable-OPNSensePlugin](Disable-OPNSensePlugin.md)
+86
View File
@@ -0,0 +1,86 @@
# Install-OPNSenseTailscale
## SYNOPSIS
Installs the Tailscale plugin on an OPNSense firewall.
## SYNTAX
```
Install-OPNSenseTailscale [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Install-OPNSenseTailscale cmdlet installs the Tailscale plugin on an OPNSense firewall if it is not already installed.
## EXAMPLES
### Example 1: Install Tailscale
```powershell
Install-OPNSenseTailscale
```
This example installs the Tailscale plugin on the OPNSense firewall.
### Example 2: Install Tailscale with confirmation
```powershell
Install-OPNSenseTailscale -Confirm
```
This example prompts for confirmation before installing the Tailscale plugin.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After installing the Tailscale plugin, you need to configure it using Set-OPNSenseTailscaleConfig and enable it using Enable-OPNSenseTailscale.
The firewall may need to be restarted after installing the plugin.
## RELATED LINKS
[Get-OPNSenseTailscaleStatus](Get-OPNSenseTailscaleStatus.md)
[Get-OPNSenseTailscaleConfig](Get-OPNSenseTailscaleConfig.md)
[Set-OPNSenseTailscaleConfig](Set-OPNSenseTailscaleConfig.md)
[Enable-OPNSenseTailscale](Enable-OPNSenseTailscale.md)
[Disable-OPNSenseTailscale](Disable-OPNSenseTailscale.md)
+166
View File
@@ -0,0 +1,166 @@
# New-OPNSenseAlias
## SYNOPSIS
Creates a new alias on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseAlias -Name <String> -Type <String> -Content <String[]> [-Description <String>] [-Enabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseAlias cmdlet creates a new alias on an OPNSense firewall. Aliases are used to define groups of network objects that can be referenced in firewall rules.
## EXAMPLES
### Example 1: Create a new host alias
```powershell
New-OPNSenseAlias -Name "WebServers" -Type "host" -Content "192.168.1.10", "192.168.1.11" -Description "Web Servers"
```
This example creates a new host alias named "WebServers" containing two IP addresses.
### Example 2: Create a new network alias
```powershell
New-OPNSenseAlias -Name "RemoteNetworks" -Type "network" -Content "10.0.0.0/24", "172.16.0.0/16" -Description "Remote Networks"
```
This example creates a new network alias named "RemoteNetworks" containing two network ranges.
### Example 3: Create a new port alias
```powershell
New-OPNSenseAlias -Name "WebPorts" -Type "port" -Content "80", "443" -Description "Web Ports"
```
This example creates a new port alias named "WebPorts" containing two port numbers.
## PARAMETERS
### -Name
The name of the alias to create.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
The type of the alias (host, network, port, url, urltable, geoip).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Content
The content of the alias, which depends on the type.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the alias.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the alias is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created alias.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating an alias, you may need to apply the changes for them to take effect.
Alias names must be unique and should not contain spaces or special characters.
## RELATED LINKS
[Get-OPNSenseAlias](Get-OPNSenseAlias.md)
[Set-OPNSenseAlias](Set-OPNSenseAlias.md)
[Remove-OPNSenseAlias](Remove-OPNSenseAlias.md)
+217
View File
@@ -0,0 +1,217 @@
# New-OPNSenseCronJob
## SYNOPSIS
Creates a new cron job on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseCronJob -Minutes <String> -Hours <String> -Days <String> -Months <String> -Weekdays <String> -Command <String>
[-Description <String>] [-Enabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseCronJob cmdlet creates a new cron job on an OPNSense firewall. Cron jobs are used to schedule commands or scripts to run at specified times.
## EXAMPLES
### Example 1: Create a daily backup cron job
```powershell
New-OPNSenseCronJob -Minutes "0" -Hours "2" -Days "*" -Months "*" -Weekdays "*" -Command "/usr/local/bin/backup.sh" -Description "Daily Backup"
```
This example creates a cron job that runs a backup script at 2:00 AM every day.
### Example 2: Create a weekly reboot cron job
```powershell
New-OPNSenseCronJob -Minutes "0" -Hours "4" -Days "*" -Months "*" -Weekdays "0" -Command "/sbin/reboot" -Description "Weekly Reboot"
```
This example creates a cron job that reboots the firewall at 4:00 AM every Sunday.
### Example 3: Create a monthly log cleanup cron job
```powershell
New-OPNSenseCronJob -Minutes "30" -Hours "1" -Days "1" -Months "*" -Weekdays "*" -Command "/usr/local/bin/cleanup_logs.sh" -Description "Monthly Log Cleanup"
```
This example creates a cron job that runs a log cleanup script at 1:30 AM on the first day of each month.
## PARAMETERS
### -Minutes
The minutes field of the cron job (0-59, *, */5, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Hours
The hours field of the cron job (0-23, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Days
The days field of the cron job (1-31, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Months
The months field of the cron job (1-12, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Weekdays
The weekdays field of the cron job (0-7, *, etc., where 0 and 7 are Sunday).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Command
The command to execute.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the cron job.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the cron job is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created cron job.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The cron job time fields use standard cron syntax:
- * means all values
- */n means every n values
- n-m means values from n to m
- n,m means values n and m
## RELATED LINKS
[Get-OPNSenseCronJob](Get-OPNSenseCronJob.md)
[Set-OPNSenseCronJob](Set-OPNSenseCronJob.md)
[Remove-OPNSenseCronJob](Remove-OPNSenseCronJob.md)
[Enable-OPNSenseCronJob](Enable-OPNSenseCronJob.md)
[Disable-OPNSenseCronJob](Disable-OPNSenseCronJob.md)
+162
View File
@@ -0,0 +1,162 @@
# New-OPNSenseDHCPOption
## SYNOPSIS
Creates a new DHCP option on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseDHCPOption -Interface <String> -Number <Int32> -Type <String> -Value <String> [-Description <String>]
[-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseDHCPOption cmdlet creates a new DHCP option on an OPNSense firewall. DHCP options allow you to provide additional configuration information to DHCP clients.
## EXAMPLES
### Example 1: Create a new DHCP option for TFTP server
```powershell
New-OPNSenseDHCPOption -Interface "lan" -Number 66 -Type "string" -Value "tftp.example.com" -Description "TFTP Server"
```
This example creates a new DHCP option 66 (TFTP server name) for the LAN interface.
### Example 2: Create a new DHCP option for boot filename
```powershell
New-OPNSenseDHCPOption -Interface "lan" -Number 67 -Type "string" -Value "pxelinux.0" -Description "Boot Filename"
```
This example creates a new DHCP option 67 (boot filename) for the LAN interface.
## PARAMETERS
### -Interface
The interface on which to create the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Number
The option number to create.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
The type of the DHCP option (string, integer, boolean, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
The value of the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created DHCP option.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a DHCP option, the DHCP server service may need to be restarted for the changes to take effect.
The DHCP server must be enabled on the specified interface for options to be provided to clients.
## RELATED LINKS
[Get-OPNSenseDHCPOption](Get-OPNSenseDHCPOption.md)
[Set-OPNSenseDHCPOption](Set-OPNSenseDHCPOption.md)
[Remove-OPNSenseDHCPOption](Remove-OPNSenseDHCPOption.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
@@ -0,0 +1,240 @@
# New-OPNSenseDHCPStaticMapping
## SYNOPSIS
Creates a new DHCP static mapping on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseDHCPStaticMapping -Interface <String> -MAC <String> -IP <String> [-Hostname <String>] [-Description <String>]
[-DNSServers <String[]>] [-Domain <String>] [-Gateway <String>] [-ARP <Boolean>]
[-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseDHCPStaticMapping cmdlet creates a new DHCP static mapping on an OPNSense firewall. This allows you to assign a specific IP address to a device based on its MAC address.
## EXAMPLES
### Example 1: Create a new DHCP static mapping
```powershell
New-OPNSenseDHCPStaticMapping -Interface "lan" -MAC "00:11:22:33:44:55" -IP "192.168.1.50" -Hostname "printer" -Description "Office Printer"
```
This example creates a new DHCP static mapping for a device with the specified MAC address on the LAN interface.
### Example 2: Create a new DHCP static mapping with custom DNS settings
```powershell
New-OPNSenseDHCPStaticMapping -Interface "lan" -MAC "AA:BB:CC:DD:EE:FF" -IP "192.168.1.60" -Hostname "server" -Description "File Server" -DNSServers "192.168.1.1", "8.8.8.8" -Domain "example.local"
```
This example creates a new DHCP static mapping with custom DNS servers and domain.
## PARAMETERS
### -Interface
The interface on which to create the DHCP static mapping.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MAC
The MAC address of the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IP
The IP address to assign to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Hostname
The hostname to assign to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DHCP static mapping.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSServers
The DNS servers to provide to the device.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Domain
The domain name to provide to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to provide to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ARP
Whether to create an ARP table entry for this device.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DHCP static mapping is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created DHCP static mapping.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a DHCP static mapping, the DHCP server service may need to be restarted for the changes to take effect.
The DHCP server must be enabled on the specified interface for static mappings to work.
## RELATED LINKS
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
@@ -0,0 +1,146 @@
# New-OPNSenseDNSForwardingHost
## SYNOPSIS
Creates a new DNS forwarding host on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseDNSForwardingHost -Domain <String> -Server <String> [-Description <String>] [-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseDNSForwardingHost cmdlet creates a new DNS forwarding host on an OPNSense firewall. This allows you to forward DNS queries for specific domains to specific DNS servers.
## EXAMPLES
### Example 1: Create a new DNS forwarding host
```powershell
New-OPNSenseDNSForwardingHost -Domain "example.com" -Server "192.168.1.10" -Description "Internal DNS Server"
```
This example creates a new DNS forwarding host that forwards queries for example.com to the DNS server at 192.168.1.10.
### Example 2: Create a disabled DNS forwarding host
```powershell
New-OPNSenseDNSForwardingHost -Domain "test.local" -Server "10.0.0.53" -Description "Test DNS Server" -Disabled $true
```
This example creates a new DNS forwarding host that is initially disabled.
## PARAMETERS
### -Domain
The domain for which DNS queries should be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Server
The DNS server to which queries for the domain should be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DNS forwarding host.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DNS forwarding host is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created DNS forwarding host.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a DNS forwarding host, you may need to apply the changes for them to take effect.
DNS forwarding must be enabled using Set-OPNSenseDNSForwarding for these settings to be used.
## RELATED LINKS
[Get-OPNSenseDNSForwardingHost](Get-OPNSenseDNSForwardingHost.md)
[Set-OPNSenseDNSForwardingHost](Set-OPNSenseDNSForwardingHost.md)
[Remove-OPNSenseDNSForwardingHost](Remove-OPNSenseDNSForwardingHost.md)
[Get-OPNSenseDNSForwarding](Get-OPNSenseDNSForwarding.md)
[Set-OPNSenseDNSForwarding](Set-OPNSenseDNSForwarding.md)
+158
View File
@@ -0,0 +1,158 @@
# New-OPNSenseDNSOverride
## SYNOPSIS
Creates a new DNS override on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseDNSOverride -Host <String> -Domain <String> -IP <String> [-Description <String>] [-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseDNSOverride cmdlet creates a new DNS override on an OPNSense firewall. This allows you to override DNS resolution for specific hosts.
## EXAMPLES
### Example 1: Create a new DNS override
```powershell
New-OPNSenseDNSOverride -Host "server" -Domain "example.com" -IP "192.168.1.10" -Description "Internal Server"
```
This example creates a new DNS override that resolves server.example.com to 192.168.1.10.
### Example 2: Create a disabled DNS override
```powershell
New-OPNSenseDNSOverride -Host "test" -Domain "local" -IP "10.0.0.5" -Description "Test Server" -Disabled $true
```
This example creates a new DNS override that is initially disabled.
## PARAMETERS
### -Host
The hostname part of the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Domain
The domain part of the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IP
The IP address to which the hostname should resolve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DNS override is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created DNS override.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a DNS override, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseDNSOverride](Get-OPNSenseDNSOverride.md)
[Set-OPNSenseDNSOverride](Set-OPNSenseDNSOverride.md)
[Remove-OPNSenseDNSOverride](Remove-OPNSenseDNSOverride.md)
+314
View File
@@ -0,0 +1,314 @@
# New-OPNSenseFirewallRule
## SYNOPSIS
Creates a new firewall rule on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseFirewallRule -Action <String> -Interface <String> -Protocol <String> [-Source <String>] [-SourcePort <String>]
[-Destination <String>] [-DestinationPort <String>] [-Description <String>] [-Enabled <Boolean>]
[-Direction <String>] [-IPProtocol <String>] [-Gateway <String>] [-Log <Boolean>]
[-Sequence <Int32>] [-Category <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseFirewallRule cmdlet creates a new firewall rule on an OPNSense firewall.
## EXAMPLES
### Example 1: Create a basic firewall rule
```powershell
New-OPNSenseFirewallRule -Action "pass" -Interface "lan" -Protocol "tcp" -Destination "any" -DestinationPort "80" -Description "Allow HTTP"
```
This example creates a firewall rule to allow HTTP traffic on the LAN interface.
### Example 2: Create a more complex firewall rule
```powershell
New-OPNSenseFirewallRule -Action "block" -Interface "wan" -Protocol "tcp/udp" -Source "10.0.0.0/24" -SourcePort "any" -Destination "192.168.1.0/24" -DestinationPort "3389" -Description "Block RDP" -Direction "in" -Log $true
```
This example creates a firewall rule to block RDP traffic from a specific source network to a specific destination network, with logging enabled.
## PARAMETERS
### -Action
The action to take for the rule (pass, block, reject).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Interface
The interface to apply the rule to.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Protocol
The protocol for the rule (tcp, udp, tcp/udp, icmp, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Source
The source address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: any
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourcePort
The source port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: any
Accept pipeline input: False
Accept wildcard characters: False
```
### -Destination
The destination address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: any
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationPort
The destination port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: any
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the rule is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -Direction
The direction for the rule (in, out).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: in
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPProtocol
The IP protocol version for the rule (inet, inet6).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: inet
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to use for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Log
Whether to log matches for the rule.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sequence
The sequence number for the rule.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -Category
The category for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created firewall rule.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating firewall rules, you need to apply the changes using Apply-OPNSenseFirewallChanges.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+219
View File
@@ -0,0 +1,219 @@
# New-OPNSenseGateway
## SYNOPSIS
Creates a new gateway on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseGateway -Name <String> -Interface <String> -IPv4Address <String> [-Description <String>] [-Priority <Int32>]
[-Weight <Int32>] [-Disabled <Boolean>] [-Monitor <Boolean>] [-MonitorIP <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseGateway cmdlet creates a new gateway on an OPNSense firewall.
## EXAMPLES
### Example 1: Create a new gateway
```powershell
New-OPNSenseGateway -Name "Backup_WAN" -Interface "opt1" -IPv4Address "203.0.113.1" -Description "Backup WAN Gateway"
```
This example creates a new gateway named "Backup_WAN" on the opt1 interface with the specified IPv4 address.
### Example 2: Create a new gateway with monitoring
```powershell
New-OPNSenseGateway -Name "ISP2" -Interface "wan2" -IPv4Address "198.51.100.1" -Description "Secondary ISP" -Monitor $true -MonitorIP "198.51.100.254"
```
This example creates a new gateway with monitoring enabled and a specific IP to monitor.
## PARAMETERS
### -Name
The name of the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Interface
The interface for the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv4Address
The IPv4 address of the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Priority
The priority of the gateway (1-255, lower is higher priority).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Weight
The weight of the gateway for load balancing.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the gateway is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Monitor
Whether to monitor the gateway.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -MonitorIP
The IP address to monitor for gateway status.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created gateway.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a gateway, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseGateway](Get-OPNSenseGateway.md)
[Set-OPNSenseGateway](Set-OPNSenseGateway.md)
[Remove-OPNSenseGateway](Remove-OPNSenseGateway.md)
@@ -0,0 +1,251 @@
# New-OPNSensePortForwardingRule
## SYNOPSIS
Creates a new port forwarding rule on an OPNSense firewall.
## SYNTAX
```
New-OPNSensePortForwardingRule -Interface <String> -Protocol <String> -SourceAddress <String> [-SourcePort <String>]
-DestinationAddress <String> -DestinationPort <String> -TargetIP <String> [-TargetPort <String>]
[-Description <String>] [-Enabled <Boolean>] [-NATReflection <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSensePortForwardingRule cmdlet creates a new port forwarding rule on an OPNSense firewall. Port forwarding rules allow external traffic to be redirected to internal hosts.
## EXAMPLES
### Example 1: Create a basic port forwarding rule
```powershell
New-OPNSensePortForwardingRule -Interface "wan" -Protocol "tcp" -SourceAddress "any" -DestinationAddress "WAN address" -DestinationPort "80" -TargetIP "192.168.1.10" -TargetPort "80" -Description "Web Server"
```
This example creates a port forwarding rule that forwards HTTP traffic to an internal web server.
### Example 2: Create a port forwarding rule with a specific source
```powershell
New-OPNSensePortForwardingRule -Interface "wan" -Protocol "tcp" -SourceAddress "203.0.113.0/24" -SourcePort "any" -DestinationAddress "WAN address" -DestinationPort "3389" -TargetIP "192.168.1.20" -TargetPort "3389" -Description "RDP Access" -NATReflection "disable"
```
This example creates a port forwarding rule that allows RDP access only from a specific network, with NAT reflection disabled.
## PARAMETERS
### -Interface
The interface on which the rule applies.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Protocol
The protocol for the rule (tcp, udp, tcp/udp).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourceAddress
The source address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourcePort
The source port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: any
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationAddress
The destination address for the rule (usually "WAN address").
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationPort
The destination port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TargetIP
The internal IP address to which traffic will be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TargetPort
The internal port to which traffic will be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the rule is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -NATReflection
The NAT reflection mode for the rule (enable, disable, system default).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: system default
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created port forwarding rule.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a port forwarding rule, you may need to apply the changes for them to take effect.
Port forwarding rules may require corresponding firewall rules to allow the traffic.
## RELATED LINKS
[Get-OPNSensePortForwardingRule](Get-OPNSensePortForwardingRule.md)
[Set-OPNSensePortForwardingRule](Set-OPNSensePortForwardingRule.md)
[Remove-OPNSensePortForwardingRule](Remove-OPNSensePortForwardingRule.md)
+143
View File
@@ -0,0 +1,143 @@
# New-OPNSenseRoute
## SYNOPSIS
Creates a new static route on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseRoute -Network <String> -Gateway <String> [-Description <String>] [-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseRoute cmdlet creates a new static route on an OPNSense firewall.
## EXAMPLES
### Example 1: Create a new static route
```powershell
New-OPNSenseRoute -Network "192.168.100.0/24" -Gateway "WAN_GW" -Description "Remote Office Network"
```
This example creates a new static route to the 192.168.100.0/24 network via the WAN_GW gateway.
### Example 2: Create a disabled static route
```powershell
New-OPNSenseRoute -Network "10.10.0.0/16" -Gateway "Backup_WAN" -Description "Backup Route" -Disabled $true
```
This example creates a new static route that is initially disabled.
## PARAMETERS
### -Network
The destination network in CIDR notation.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to use for the route.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the route.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the route is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created static route.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a static route, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseRoute](Get-OPNSenseRoute.md)
[Set-OPNSenseRoute](Set-OPNSenseRoute.md)
[Remove-OPNSenseRoute](Remove-OPNSenseRoute.md)
+252
View File
@@ -0,0 +1,252 @@
# New-OPNSenseSubnetVLANs
## SYNOPSIS
Creates multiple VLANs and interfaces for a subnet on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseSubnetVLANs -Device <String> -Subnet <String> -VLANStart <Int32> -VLANCount <Int32> [-Description <String>]
[-DHCP <Boolean>] [-DHCPStart <Int32>] [-DHCPEnd <Int32>] [-DHCPDNSServer <String>]
[-DHCPDomain <String>] [-DHCPLeaseTime <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseSubnetVLANs cmdlet creates multiple VLANs and interfaces for a subnet on an OPNSense firewall. This is useful for quickly setting up a network with multiple VLANs.
## EXAMPLES
### Example 1: Create multiple VLANs for a subnet
```powershell
New-OPNSenseSubnetVLANs -Device "igb0" -Subnet "10.0.0.0/16" -VLANStart 100 -VLANCount 5 -Description "Department VLANs"
```
This example creates 5 VLANs starting at VLAN 100 on the igb0 interface, with subnets derived from 10.0.0.0/16.
### Example 2: Create multiple VLANs with DHCP enabled
```powershell
New-OPNSenseSubnetVLANs -Device "igb0" -Subnet "192.168.0.0/16" -VLANStart 200 -VLANCount 3 -Description "Guest VLANs" -DHCP $true -DHCPDNSServer "8.8.8.8,8.8.4.4" -DHCPDomain "example.com"
```
This example creates 3 VLANs starting at VLAN 200 on the igb0 interface, with subnets derived from 192.168.0.0/16, and DHCP enabled with custom DNS servers and domain.
## PARAMETERS
### -Device
The physical interface to create the VLANs on.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Subnet
The base subnet in CIDR notation (e.g., 10.0.0.0/16).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VLANStart
The starting VLAN tag.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VLANCount
The number of VLANs to create.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description prefix for the VLANs.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCP
Whether to enable DHCP on the VLAN interfaces.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCPStart
The starting IP offset for the DHCP range.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 100
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCPEnd
The ending IP offset for the DHCP range.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 200
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCPDNSServer
The DNS servers for DHCP clients.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCPDomain
The domain name for DHCP clients.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DHCPLeaseTime
The lease time for DHCP clients.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 7200
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns objects representing the created VLANs and interfaces.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
This cmdlet creates multiple VLANs and interfaces in a single operation, which can be useful for setting up a network quickly.
The subnet is divided into smaller subnets based on the number of VLANs requested.
## RELATED LINKS
[Get-OPNSenseVLAN](Get-OPNSenseVLAN.md)
[New-OPNSenseVLAN](New-OPNSenseVLAN.md)
[Set-OPNSenseVLAN](Set-OPNSenseVLAN.md)
[Remove-OPNSenseVLAN](Remove-OPNSenseVLAN.md)
+215
View File
@@ -0,0 +1,215 @@
# New-OPNSenseUser
## SYNOPSIS
Creates a new user on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseUser -Username <String> -Password <SecureString> [-FullName <String>] [-Email <String>] [-Comment <String>]
[-Disabled <Boolean>] [-ExpireDate <DateTime>] [-AuthGroup <String[]>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseUser cmdlet creates a new user on an OPNSense firewall.
## EXAMPLES
### Example 1: Create a new user
```powershell
$password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
New-OPNSenseUser -Username "newuser" -Password $password -FullName "New User" -Email "newuser@example.com"
```
This example creates a new user with the specified username, password, full name, and email address.
### Example 2: Create a new user with an expiration date
```powershell
$password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
$expireDate = (Get-Date).AddMonths(3)
New-OPNSenseUser -Username "tempuser" -Password $password -FullName "Temporary User" -ExpireDate $expireDate -Comment "Temporary access"
```
This example creates a new user that will expire in 3 months.
### Example 3: Create a new user with specific authorization groups
```powershell
$password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
New-OPNSenseUser -Username "adminuser" -Password $password -FullName "Admin User" -AuthGroup "admins", "vpnusers"
```
This example creates a new user and assigns them to the "admins" and "vpnusers" authorization groups.
## PARAMETERS
### -Username
The username for the new user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Password
The password for the new user as a SecureString.
```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FullName
The full name of the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Email
The email address of the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Comment
A comment or description for the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the user account is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExpireDate
The date when the user account will expire.
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AuthGroup
The authorization groups to which the user belongs.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created user.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
For security reasons, it is recommended to use a SecureString for the password parameter.
## RELATED LINKS
[Get-OPNSenseUser](Get-OPNSenseUser.md)
[Set-OPNSenseUser](Set-OPNSenseUser.md)
[Remove-OPNSenseUser](Remove-OPNSenseUser.md)
+144
View File
@@ -0,0 +1,144 @@
# New-OPNSenseVLAN
## SYNOPSIS
Creates a new VLAN on an OPNSense firewall.
## SYNTAX
```
New-OPNSenseVLAN -Device <String> -Tag <Int32> [-Priority <Int32>] [-Description <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The New-OPNSenseVLAN cmdlet creates a new VLAN on an OPNSense firewall.
## EXAMPLES
### Example 1: Create a new VLAN
```powershell
New-OPNSenseVLAN -Device "igb0" -Tag 10 -Description "Management VLAN"
```
This example creates a new VLAN with tag 10 on the igb0 interface with a description of "Management VLAN".
### Example 2: Create a new VLAN with priority
```powershell
New-OPNSenseVLAN -Device "igb0" -Tag 20 -Priority 5 -Description "Voice VLAN"
```
This example creates a new VLAN with tag 20 and priority 5 on the igb0 interface with a description of "Voice VLAN".
## PARAMETERS
### -Device
The physical interface to create the VLAN on.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Tag
The VLAN tag (1-4094).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Priority
The VLAN priority (0-7).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the VLAN.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the newly created VLAN.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After creating a VLAN, you may need to configure an interface to use it.
## RELATED LINKS
[Get-OPNSenseVLAN](Get-OPNSenseVLAN.md)
[Set-OPNSenseVLAN](Set-OPNSenseVLAN.md)
[Remove-OPNSenseVLAN](Remove-OPNSenseVLAN.md)
[New-OPNSenseSubnetVLANs](New-OPNSenseSubnetVLANs.md)
+100
View File
@@ -0,0 +1,100 @@
# Remove-OPNSenseAlias
## SYNOPSIS
Removes an alias from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseAlias -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseAlias cmdlet removes an alias from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove an alias
```powershell
Remove-OPNSenseAlias -Name "WebServers"
```
This example removes the alias named "WebServers" from the OPNSense firewall.
### Example 2: Remove an alias with confirmation
```powershell
Remove-OPNSenseAlias -Name "RemoteNetworks" -Confirm
```
This example prompts for confirmation before removing the alias.
## PARAMETERS
### -Name
The name of the alias to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the alias name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing an alias, you may need to apply the changes for them to take effect.
Be careful when removing aliases that are used in firewall rules, as this may cause the rules to stop working.
## RELATED LINKS
[Get-OPNSenseAlias](Get-OPNSenseAlias.md)
[New-OPNSenseAlias](New-OPNSenseAlias.md)
[Set-OPNSenseAlias](Set-OPNSenseAlias.md)
+101
View File
@@ -0,0 +1,101 @@
# Remove-OPNSenseCronJob
## SYNOPSIS
Removes a cron job from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseCronJob -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseCronJob cmdlet removes a cron job from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a cron job
```powershell
Remove-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the cron job with the specified UUID.
### Example 2: Remove a cron job with confirmation
```powershell
Remove-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the cron job.
## PARAMETERS
### -UUID
The UUID of the cron job to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a cron job to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Be careful when removing cron jobs that perform important system maintenance tasks.
## RELATED LINKS
[Get-OPNSenseCronJob](Get-OPNSenseCronJob.md)
[New-OPNSenseCronJob](New-OPNSenseCronJob.md)
[Set-OPNSenseCronJob](Set-OPNSenseCronJob.md)
[Enable-OPNSenseCronJob](Enable-OPNSenseCronJob.md)
[Disable-OPNSenseCronJob](Disable-OPNSenseCronJob.md)
+118
View File
@@ -0,0 +1,118 @@
# Remove-OPNSenseDHCPLease
## SYNOPSIS
Removes a DHCP lease from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseDHCPLease -Interface <String> -IP <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseDHCPLease cmdlet removes a DHCP lease from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a DHCP lease
```powershell
Remove-OPNSenseDHCPLease -Interface "lan" -IP "192.168.1.100"
```
This example removes the DHCP lease for the specified IP address on the LAN interface.
### Example 2: Remove a DHCP lease with confirmation
```powershell
Remove-OPNSenseDHCPLease -Interface "lan" -IP "192.168.1.100" -Confirm
```
This example prompts for confirmation before removing the DHCP lease.
## PARAMETERS
### -Interface
The interface from which to remove the DHCP lease.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -IP
The IP address of the DHCP lease to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe strings containing the interface name and IP address to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Removing a DHCP lease will force the client to request a new lease the next time it connects.
## RELATED LINKS
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
+117
View File
@@ -0,0 +1,117 @@
# Remove-OPNSenseDHCPOption
## SYNOPSIS
Removes a DHCP option from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseDHCPOption -Interface <String> -Number <Int32> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseDHCPOption cmdlet removes a DHCP option from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a DHCP option
```powershell
Remove-OPNSenseDHCPOption -Interface "lan" -Number 66
```
This example removes DHCP option 66 (TFTP server name) from the LAN interface.
### Example 2: Remove a DHCP option with confirmation
```powershell
Remove-OPNSenseDHCPOption -Interface "lan" -Number 67 -Confirm
```
This example prompts for confirmation before removing DHCP option 67 (boot filename) from the LAN interface.
## PARAMETERS
### -Interface
The interface from which to remove the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Number
The option number to remove.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
### System.Int32
You can pipe strings containing the interface name and integers containing the option number to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing a DHCP option, the DHCP server service may need to be restarted for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseDHCPOption](Get-OPNSenseDHCPOption.md)
[New-OPNSenseDHCPOption](New-OPNSenseDHCPOption.md)
[Set-OPNSenseDHCPOption](Set-OPNSenseDHCPOption.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
@@ -0,0 +1,118 @@
# Remove-OPNSenseDHCPStaticMapping
## SYNOPSIS
Removes a DHCP static mapping from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseDHCPStaticMapping -Interface <String> -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseDHCPStaticMapping cmdlet removes a DHCP static mapping from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a DHCP static mapping
```powershell
Remove-OPNSenseDHCPStaticMapping -Interface "lan" -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the DHCP static mapping with the specified UUID from the LAN interface.
### Example 2: Remove a DHCP static mapping with confirmation
```powershell
Remove-OPNSenseDHCPStaticMapping -Interface "lan" -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the DHCP static mapping.
## PARAMETERS
### -Interface
The interface from which to remove the DHCP static mapping.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -UUID
The UUID of the DHCP static mapping to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe strings containing the interface name and UUID to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing a DHCP static mapping, the DHCP server service may need to be restarted for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
@@ -0,0 +1,101 @@
# Remove-OPNSenseDNSForwardingHost
## SYNOPSIS
Removes a DNS forwarding host from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseDNSForwardingHost -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseDNSForwardingHost cmdlet removes a DNS forwarding host from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a DNS forwarding host
```powershell
Remove-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the DNS forwarding host with the specified UUID.
### Example 2: Remove a DNS forwarding host with confirmation
```powershell
Remove-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the DNS forwarding host.
## PARAMETERS
### -UUID
The UUID of the DNS forwarding host to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a DNS forwarding host to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing a DNS forwarding host, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseDNSForwardingHost](Get-OPNSenseDNSForwardingHost.md)
[New-OPNSenseDNSForwardingHost](New-OPNSenseDNSForwardingHost.md)
[Set-OPNSenseDNSForwardingHost](Set-OPNSenseDNSForwardingHost.md)
[Get-OPNSenseDNSForwarding](Get-OPNSenseDNSForwarding.md)
[Set-OPNSenseDNSForwarding](Set-OPNSenseDNSForwarding.md)
@@ -0,0 +1,99 @@
# Remove-OPNSenseDNSOverride
## SYNOPSIS
Removes a DNS override from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseDNSOverride -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseDNSOverride cmdlet removes a DNS override from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a DNS override
```powershell
Remove-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the DNS override with the specified UUID.
### Example 2: Remove a DNS override with confirmation
```powershell
Remove-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the DNS override.
## PARAMETERS
### -UUID
The UUID of the DNS override to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a DNS override to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing a DNS override, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseDNSOverride](Get-OPNSenseDNSOverride.md)
[New-OPNSenseDNSOverride](New-OPNSenseDNSOverride.md)
[Set-OPNSenseDNSOverride](Set-OPNSenseDNSOverride.md)
+102
View File
@@ -0,0 +1,102 @@
# Remove-OPNSenseFirewallRule
## SYNOPSIS
Removes a firewall rule from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseFirewallRule -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseFirewallRule cmdlet removes a firewall rule from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a firewall rule
```powershell
Remove-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the firewall rule with the specified UUID.
### Example 2: Remove a firewall rule with confirmation
```powershell
Remove-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the firewall rule.
## PARAMETERS
### -UUID
The UUID of the firewall rule to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a firewall rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing firewall rules, you need to apply the changes using Apply-OPNSenseFirewallChanges.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Set-OPNSenseFirewallRule](Set-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+100
View File
@@ -0,0 +1,100 @@
# Remove-OPNSenseGateway
## SYNOPSIS
Removes a gateway from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseGateway -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseGateway cmdlet removes a gateway from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a gateway
```powershell
Remove-OPNSenseGateway -Name "Backup_WAN"
```
This example removes the gateway named "Backup_WAN".
### Example 2: Remove a gateway with confirmation
```powershell
Remove-OPNSenseGateway -Name "ISP2" -Confirm
```
This example prompts for confirmation before removing the gateway named "ISP2".
## PARAMETERS
### -Name
The name of the gateway to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the name of a gateway to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Removing a gateway may affect routing and network connectivity.
Make sure the gateway is not in use by any firewall rules or routes before removing it.
## RELATED LINKS
[Get-OPNSenseGateway](Get-OPNSenseGateway.md)
[New-OPNSenseGateway](New-OPNSenseGateway.md)
[Set-OPNSenseGateway](Set-OPNSenseGateway.md)
@@ -0,0 +1,100 @@
# Remove-OPNSensePortForwardingRule
## SYNOPSIS
Removes a port forwarding rule from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSensePortForwardingRule -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSensePortForwardingRule cmdlet removes a port forwarding rule from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a port forwarding rule
```powershell
Remove-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the port forwarding rule with the specified UUID.
### Example 2: Remove a port forwarding rule with confirmation
```powershell
Remove-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the port forwarding rule.
## PARAMETERS
### -UUID
The UUID of the port forwarding rule to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a port forwarding rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After removing a port forwarding rule, you may need to apply the changes for them to take effect.
You may also want to remove any corresponding firewall rules that are no longer needed.
## RELATED LINKS
[Get-OPNSensePortForwardingRule](Get-OPNSensePortForwardingRule.md)
[New-OPNSensePortForwardingRule](New-OPNSensePortForwardingRule.md)
[Set-OPNSensePortForwardingRule](Set-OPNSensePortForwardingRule.md)
+99
View File
@@ -0,0 +1,99 @@
# Remove-OPNSenseRoute
## SYNOPSIS
Removes a static route from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseRoute -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseRoute cmdlet removes a static route from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a static route
```powershell
Remove-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the static route with the specified UUID.
### Example 2: Remove a static route with confirmation
```powershell
Remove-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the static route.
## PARAMETERS
### -UUID
The UUID of the route to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a route to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Removing a static route may affect network connectivity.
## RELATED LINKS
[Get-OPNSenseRoute](Get-OPNSenseRoute.md)
[New-OPNSenseRoute](New-OPNSenseRoute.md)
[Set-OPNSenseRoute](Set-OPNSenseRoute.md)
+100
View File
@@ -0,0 +1,100 @@
# Remove-OPNSenseUser
## SYNOPSIS
Removes a user from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseUser -Username <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseUser cmdlet removes a user from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a user
```powershell
Remove-OPNSenseUser -Username "tempuser"
```
This example removes the user with the username "tempuser" from the OPNSense firewall.
### Example 2: Remove a user with confirmation
```powershell
Remove-OPNSenseUser -Username "olduser" -Confirm
```
This example prompts for confirmation before removing the user.
## PARAMETERS
### -Username
The username of the user to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the username to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Be careful when removing users, especially the "admin" user, as this could lock you out of the firewall.
You cannot remove the currently logged-in user.
## RELATED LINKS
[Get-OPNSenseUser](Get-OPNSenseUser.md)
[New-OPNSenseUser](New-OPNSenseUser.md)
[Set-OPNSenseUser](Set-OPNSenseUser.md)
+101
View File
@@ -0,0 +1,101 @@
# Remove-OPNSenseVLAN
## SYNOPSIS
Removes a VLAN from an OPNSense firewall.
## SYNTAX
```
Remove-OPNSenseVLAN -UUID <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Remove-OPNSenseVLAN cmdlet removes a VLAN from an OPNSense firewall.
## EXAMPLES
### Example 1: Remove a VLAN
```powershell
Remove-OPNSenseVLAN -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
This example removes the VLAN with the specified UUID.
### Example 2: Remove a VLAN with confirmation
```powershell
Remove-OPNSenseVLAN -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Confirm
```
This example prompts for confirmation before removing the VLAN.
## PARAMETERS
### -UUID
The UUID of the VLAN to remove.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a VLAN to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Removing a VLAN will affect network connectivity for devices using that VLAN.
Make sure the VLAN is not in use by any interfaces before removing it.
## RELATED LINKS
[Get-OPNSenseVLAN](Get-OPNSenseVLAN.md)
[New-OPNSenseVLAN](New-OPNSenseVLAN.md)
[Set-OPNSenseVLAN](Set-OPNSenseVLAN.md)
[New-OPNSenseSubnetVLANs](New-OPNSenseSubnetVLANs.md)
+92
View File
@@ -0,0 +1,92 @@
# Restart-OPNSenseInterface
## SYNOPSIS
Restarts a network interface on an OPNSense firewall.
## SYNTAX
```
Restart-OPNSenseInterface -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Restart-OPNSenseInterface cmdlet restarts a network interface on an OPNSense firewall.
## EXAMPLES
### Example 1: Restart an interface
```powershell
Restart-OPNSenseInterface -Name "lan"
```
This example restarts the LAN interface.
## PARAMETERS
### -Name
The name of the interface to restart.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the name of an interface to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Restarting an interface may temporarily disrupt network connectivity.
## RELATED LINKS
[Get-OPNSenseInterface](Get-OPNSenseInterface.md)
[Set-OPNSenseInterface](Set-OPNSenseInterface.md)
[Get-OPNSenseInterfaceStatistics](Get-OPNSenseInterfaceStatistics.md)
+99
View File
@@ -0,0 +1,99 @@
# Restart-OPNSenseService
## SYNOPSIS
Restarts a service on an OPNSense firewall.
## SYNTAX
```
Restart-OPNSenseService -Name <String> [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Restart-OPNSenseService cmdlet restarts a service on an OPNSense firewall.
## EXAMPLES
### Example 1: Restart a service
```powershell
Restart-OPNSenseService -Name "dhcpd"
```
This example restarts the DHCP service on the OPNSense firewall.
### Example 2: Restart a service with confirmation
```powershell
Restart-OPNSenseService -Name "unbound" -Confirm
```
This example prompts for confirmation before restarting the DNS resolver service.
## PARAMETERS
### -Name
The name of the service to restart.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the service name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Restarting essential services may temporarily disrupt network connectivity or firewall functionality.
## RELATED LINKS
[Get-OPNSenseService](Get-OPNSenseService.md)
[Start-OPNSenseService](Start-OPNSenseService.md)
[Stop-OPNSenseService](Stop-OPNSenseService.md)
+84
View File
@@ -0,0 +1,84 @@
# Restart-OPNSenseSystem
## SYNOPSIS
Restarts an OPNSense firewall.
## SYNTAX
```
Restart-OPNSenseSystem [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Restart-OPNSenseSystem cmdlet restarts an OPNSense firewall.
## EXAMPLES
### Example 1: Restart the system
```powershell
Restart-OPNSenseSystem
```
This example restarts the OPNSense firewall.
### Example 2: Restart the system with confirmation
```powershell
Restart-OPNSenseSystem -Confirm
```
This example prompts for confirmation before restarting the OPNSense firewall.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Restarting the firewall will temporarily disrupt network connectivity.
The connection to the firewall will be lost during the restart.
## RELATED LINKS
[Stop-OPNSenseSystem](Stop-OPNSenseSystem.md)
[Get-OPNSenseSystemStatus](Get-OPNSenseSystemStatus.md)
[Get-OPNSenseSystemInfo](Get-OPNSenseSystemInfo.md)
+142
View File
@@ -0,0 +1,142 @@
# Restore-OPNSenseConfig
## SYNOPSIS
Restores an OPNSense firewall configuration.
## SYNTAX
### Filename
```
Restore-OPNSenseConfig -Filename <String> [-Force] [-WhatIf] [-Confirm]
```
### XmlDocument
```
Restore-OPNSenseConfig -XmlDocument <XmlDocument> [-Force] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Restore-OPNSenseConfig cmdlet restores an OPNSense firewall configuration from a backup or an XML document.
## EXAMPLES
### Example 1: Restore a configuration backup
```powershell
Restore-OPNSenseConfig -Filename "config-backup-20250414-1234.xml"
```
This example restores an OPNSense firewall configuration from a backup file.
### Example 2: Restore a configuration from an XML document
```powershell
$config = Get-OPNSenseConfig
Restore-OPNSenseConfig -XmlDocument $config
```
This example restores an OPNSense firewall configuration from an XML document.
### Example 3: Restore a configuration from the pipeline
```powershell
Get-OPNSenseConfig | Restore-OPNSenseConfig
```
This example restores an OPNSense firewall configuration from the pipeline.
## PARAMETERS
### -Filename
The filename of the backup to restore.
```yaml
Type: String
Parameter Sets: Filename
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -XmlDocument
The XML document containing the configuration to restore.
```yaml
Type: XmlDocument
Parameter Sets: XmlDocument
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Force
Suppresses the confirmation prompt.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.Xml.XmlDocument
An XML document containing the OPNSense configuration.
## OUTPUTS
### None
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The firewall will restart after the configuration is restored.
## RELATED LINKS
[Get-OPNSenseConfig](Get-OPNSenseConfig.md)
[Export-OPNSenseConfig](Export-OPNSenseConfig.md)
[Import-OPNSenseConfig](Import-OPNSenseConfig.md)
+167
View File
@@ -0,0 +1,167 @@
# Set-OPNSenseAlias
## SYNOPSIS
Modifies an existing alias on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseAlias -Name <String> [-Type <String>] [-Content <String[]>] [-Description <String>] [-Enabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseAlias cmdlet modifies an existing alias on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify an alias description
```powershell
Set-OPNSenseAlias -Name "WebServers" -Description "Updated Web Servers"
```
This example updates the description of the alias named "WebServers".
### Example 2: Modify alias content
```powershell
Set-OPNSenseAlias -Name "WebServers" -Content "192.168.1.10", "192.168.1.11", "192.168.1.12"
```
This example updates the content of the alias named "WebServers" to include an additional IP address.
### Example 3: Disable an alias
```powershell
Set-OPNSenseAlias -Name "WebServers" -Enabled $false
```
This example disables the alias named "WebServers".
## PARAMETERS
### -Name
The name of the alias to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Type
The type of the alias (host, network, port, url, urltable, geoip).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Content
The content of the alias, which depends on the type.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the alias.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the alias is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the alias name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified alias.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying an alias, you may need to apply the changes for them to take effect.
Changing the type of an alias may require adjusting the content to match the new type.
## RELATED LINKS
[Get-OPNSenseAlias](Get-OPNSenseAlias.md)
[New-OPNSenseAlias](New-OPNSenseAlias.md)
[Remove-OPNSenseAlias](Remove-OPNSenseAlias.md)
+233
View File
@@ -0,0 +1,233 @@
# Set-OPNSenseCronJob
## SYNOPSIS
Modifies an existing cron job on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseCronJob -UUID <String> [-Minutes <String>] [-Hours <String>] [-Days <String>] [-Months <String>]
[-Weekdays <String>] [-Command <String>] [-Description <String>] [-Enabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseCronJob cmdlet modifies an existing cron job on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a cron job description
```powershell
Set-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated Backup Job"
```
This example updates the description of an existing cron job.
### Example 2: Change the schedule of a cron job
```powershell
Set-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Hours "3" -Minutes "30"
```
This example changes the schedule of an existing cron job to run at 3:30 AM.
### Example 3: Disable a cron job
```powershell
Set-OPNSenseCronJob -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Enabled $false
```
This example disables an existing cron job.
## PARAMETERS
### -UUID
The UUID of the cron job to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Minutes
The minutes field of the cron job (0-59, *, */5, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Hours
The hours field of the cron job (0-23, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Days
The days field of the cron job (1-31, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Months
The months field of the cron job (1-12, *, */2, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Weekdays
The weekdays field of the cron job (0-7, *, etc., where 0 and 7 are Sunday).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Command
The command to execute.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the cron job.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the cron job is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a cron job to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified cron job.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The cron job time fields use standard cron syntax:
- * means all values
- */n means every n values
- n-m means values from n to m
- n,m means values n and m
## RELATED LINKS
[Get-OPNSenseCronJob](Get-OPNSenseCronJob.md)
[New-OPNSenseCronJob](New-OPNSenseCronJob.md)
[Remove-OPNSenseCronJob](Remove-OPNSenseCronJob.md)
[Enable-OPNSenseCronJob](Enable-OPNSenseCronJob.md)
[Disable-OPNSenseCronJob](Disable-OPNSenseCronJob.md)
+164
View File
@@ -0,0 +1,164 @@
# Set-OPNSenseDHCPOption
## SYNOPSIS
Modifies an existing DHCP option on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDHCPOption -Interface <String> -Number <Int32> [-Type <String>] [-Value <String>] [-Description <String>]
[-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDHCPOption cmdlet modifies an existing DHCP option on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a DHCP option value
```powershell
Set-OPNSenseDHCPOption -Interface "lan" -Number 66 -Value "newtftp.example.com"
```
This example updates the value of DHCP option 66 (TFTP server name) for the LAN interface.
### Example 2: Modify a DHCP option description
```powershell
Set-OPNSenseDHCPOption -Interface "lan" -Number 67 -Description "Updated Boot Filename"
```
This example updates the description of DHCP option 67 (boot filename) for the LAN interface.
## PARAMETERS
### -Interface
The interface on which the DHCP option exists.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Number
The option number to modify.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Type
The type of the DHCP option (string, integer, boolean, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
The value of the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DHCP option.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
### System.Int32
You can pipe strings containing the interface name and integers containing the option number to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified DHCP option.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a DHCP option, the DHCP server service may need to be restarted for the changes to take effect.
The DHCP server must be enabled on the specified interface for options to be provided to clients.
## RELATED LINKS
[Get-OPNSenseDHCPOption](Get-OPNSenseDHCPOption.md)
[New-OPNSenseDHCPOption](New-OPNSenseDHCPOption.md)
[Remove-OPNSenseDHCPOption](Remove-OPNSenseDHCPOption.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
+240
View File
@@ -0,0 +1,240 @@
# Set-OPNSenseDHCPServer
## SYNOPSIS
Modifies DHCP server settings on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDHCPServer -Interface <String> [-Enabled <Boolean>] [-RangeFrom <String>] [-RangeTo <String>]
[-DNSServers <String[]>] [-Domain <String>] [-Gateway <String>] [-LeaseTime <String>]
[-DenyUnknownClients <Boolean>] [-IgnoreClientIdentifiers <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDHCPServer cmdlet modifies DHCP server settings on an OPNSense firewall for a specific interface.
## EXAMPLES
### Example 1: Enable the DHCP server on an interface
```powershell
Set-OPNSenseDHCPServer -Interface "lan" -Enabled $true
```
This example enables the DHCP server on the LAN interface.
### Example 2: Configure DHCP server settings
```powershell
Set-OPNSenseDHCPServer -Interface "lan" -Enabled $true -RangeFrom "192.168.1.100" -RangeTo "192.168.1.200" -DNSServers "192.168.1.1", "8.8.8.8" -Domain "example.local" -LeaseTime "86400"
```
This example configures multiple DHCP server settings for the LAN interface.
## PARAMETERS
### -Interface
The interface for which to modify DHCP server settings.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Enabled
Whether the DHCP server is enabled for the interface.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RangeFrom
The starting IP address of the DHCP range.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RangeTo
The ending IP address of the DHCP range.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSServers
The DNS servers to provide to DHCP clients.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Domain
The domain name to provide to DHCP clients.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to provide to DHCP clients.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -LeaseTime
The lease time in seconds for DHCP leases.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DenyUnknownClients
Whether to deny unknown clients.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IgnoreClientIdentifiers
Whether to ignore client identifiers.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the interface name to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified DHCP server settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying DHCP server settings, the DHCP server service may need to be restarted for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Set-OPNSenseDHCPStaticMapping](Set-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
@@ -0,0 +1,263 @@
# Set-OPNSenseDHCPStaticMapping
## SYNOPSIS
Modifies an existing DHCP static mapping on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDHCPStaticMapping -Interface <String> -UUID <String> [-MAC <String>] [-IP <String>] [-Hostname <String>]
[-Description <String>] [-DNSServers <String[]>] [-Domain <String>] [-Gateway <String>]
[-ARP <Boolean>] [-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDHCPStaticMapping cmdlet modifies an existing DHCP static mapping on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a DHCP static mapping description
```powershell
Set-OPNSenseDHCPStaticMapping -Interface "lan" -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated Printer Description"
```
This example updates the description of an existing DHCP static mapping.
### Example 2: Change the IP address for a DHCP static mapping
```powershell
Set-OPNSenseDHCPStaticMapping -Interface "lan" -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -IP "192.168.1.55"
```
This example changes the IP address used for an existing DHCP static mapping.
### Example 3: Disable a DHCP static mapping
```powershell
Set-OPNSenseDHCPStaticMapping -Interface "lan" -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Disabled $true
```
This example disables an existing DHCP static mapping.
## PARAMETERS
### -Interface
The interface on which the DHCP static mapping exists.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -UUID
The UUID of the DHCP static mapping to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -MAC
The MAC address of the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IP
The IP address to assign to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Hostname
The hostname to assign to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DHCP static mapping.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSServers
The DNS servers to provide to the device.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Domain
The domain name to provide to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to provide to the device.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ARP
Whether to create an ARP table entry for this device.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DHCP static mapping is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe strings containing the interface name and UUID to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified DHCP static mapping.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a DHCP static mapping, the DHCP server service may need to be restarted for the changes to take effect.
The DHCP server must be enabled on the specified interface for static mappings to work.
## RELATED LINKS
[Get-OPNSenseDHCPStaticMapping](Get-OPNSenseDHCPStaticMapping.md)
[New-OPNSenseDHCPStaticMapping](New-OPNSenseDHCPStaticMapping.md)
[Remove-OPNSenseDHCPStaticMapping](Remove-OPNSenseDHCPStaticMapping.md)
[Get-OPNSenseDHCPServer](Get-OPNSenseDHCPServer.md)
[Set-OPNSenseDHCPServer](Set-OPNSenseDHCPServer.md)
[Get-OPNSenseDHCPLease](Get-OPNSenseDHCPLease.md)
[Remove-OPNSenseDHCPLease](Remove-OPNSenseDHCPLease.md)
+100
View File
@@ -0,0 +1,100 @@
# Set-OPNSenseDNSForwarding
## SYNOPSIS
Modifies DNS forwarding settings on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDNSForwarding [-Enabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDNSForwarding cmdlet modifies DNS forwarding settings on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable DNS forwarding
```powershell
Set-OPNSenseDNSForwarding -Enabled $true
```
This example enables DNS forwarding on the OPNSense firewall.
### Example 2: Disable DNS forwarding
```powershell
Set-OPNSenseDNSForwarding -Enabled $false
```
This example disables DNS forwarding on the OPNSense firewall.
## PARAMETERS
### -Enabled
Whether DNS forwarding is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the modified DNS forwarding settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying DNS forwarding settings, the DNS service may need to be restarted for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseDNSForwarding](Get-OPNSenseDNSForwarding.md)
[Get-OPNSenseDNSForwardingHost](Get-OPNSenseDNSForwardingHost.md)
[New-OPNSenseDNSForwardingHost](New-OPNSenseDNSForwardingHost.md)
[Set-OPNSenseDNSForwardingHost](Set-OPNSenseDNSForwardingHost.md)
[Remove-OPNSenseDNSForwardingHost](Remove-OPNSenseDNSForwardingHost.md)
@@ -0,0 +1,170 @@
# Set-OPNSenseDNSForwardingHost
## SYNOPSIS
Modifies an existing DNS forwarding host on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDNSForwardingHost -UUID <String> [-Domain <String>] [-Server <String>] [-Description <String>]
[-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDNSForwardingHost cmdlet modifies an existing DNS forwarding host on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a DNS forwarding host description
```powershell
Set-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated DNS Server"
```
This example updates the description of an existing DNS forwarding host.
### Example 2: Change the server for a DNS forwarding host
```powershell
Set-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Server "192.168.2.10"
```
This example changes the DNS server used for an existing DNS forwarding host.
### Example 3: Disable a DNS forwarding host
```powershell
Set-OPNSenseDNSForwardingHost -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Disabled $true
```
This example disables an existing DNS forwarding host.
## PARAMETERS
### -UUID
The UUID of the DNS forwarding host to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Domain
The domain for which DNS queries should be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Server
The DNS server to which queries for the domain should be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DNS forwarding host.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DNS forwarding host is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a DNS forwarding host to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified DNS forwarding host.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a DNS forwarding host, you may need to apply the changes for them to take effect.
DNS forwarding must be enabled using Set-OPNSenseDNSForwarding for these settings to be used.
## RELATED LINKS
[Get-OPNSenseDNSForwardingHost](Get-OPNSenseDNSForwardingHost.md)
[New-OPNSenseDNSForwardingHost](New-OPNSenseDNSForwardingHost.md)
[Remove-OPNSenseDNSForwardingHost](Remove-OPNSenseDNSForwardingHost.md)
[Get-OPNSenseDNSForwarding](Get-OPNSenseDNSForwarding.md)
[Set-OPNSenseDNSForwarding](Set-OPNSenseDNSForwarding.md)
+182
View File
@@ -0,0 +1,182 @@
# Set-OPNSenseDNSOverride
## SYNOPSIS
Modifies an existing DNS override on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDNSOverride -UUID <String> [-Host <String>] [-Domain <String>] [-IP <String>] [-Description <String>]
[-Disabled <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDNSOverride cmdlet modifies an existing DNS override on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a DNS override description
```powershell
Set-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated Server Description"
```
This example updates the description of an existing DNS override.
### Example 2: Change the IP address for a DNS override
```powershell
Set-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -IP "192.168.1.20"
```
This example changes the IP address used for an existing DNS override.
### Example 3: Disable a DNS override
```powershell
Set-OPNSenseDNSOverride -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Disabled $true
```
This example disables an existing DNS override.
## PARAMETERS
### -UUID
The UUID of the DNS override to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Host
The hostname part of the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Domain
The domain part of the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IP
The IP address to which the hostname should resolve.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the DNS override.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the DNS override is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a DNS override to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified DNS override.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a DNS override, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseDNSOverride](Get-OPNSenseDNSOverride.md)
[New-OPNSenseDNSOverride](New-OPNSenseDNSOverride.md)
[Remove-OPNSenseDNSOverride](Remove-OPNSenseDNSOverride.md)
+266
View File
@@ -0,0 +1,266 @@
# Set-OPNSenseDNSServer
## SYNOPSIS
Modifies DNS server settings on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseDNSServer [-Enabled <Boolean>] [-ListenIPs <String[]>] [-Port <Int32>] [-DNSSECEnabled <Boolean>]
[-ForwardMode <String>] [-StrictBindingEnabled <Boolean>] [-AllQueryLogEnabled <Boolean>]
[-RegisterIPv4 <Boolean>] [-RegisterIPv6 <Boolean>] [-DNSv6PrefixEnabled <Boolean>]
[-PreferIPv4 <Boolean>] [-PreferIPv6 <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseDNSServer cmdlet modifies DNS server settings on an OPNSense firewall.
## EXAMPLES
### Example 1: Enable the DNS server
```powershell
Set-OPNSenseDNSServer -Enabled $true
```
This example enables the DNS server on the OPNSense firewall.
### Example 2: Configure DNS server settings
```powershell
Set-OPNSenseDNSServer -Enabled $true -ListenIPs "127.0.0.1", "192.168.1.1" -Port 53 -DNSSECEnabled $true -ForwardMode "forward" -AllQueryLogEnabled $true
```
This example configures multiple DNS server settings on the OPNSense firewall.
## PARAMETERS
### -Enabled
Whether the DNS server is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ListenIPs
The IP addresses on which the DNS server should listen.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Port
The port on which the DNS server should listen.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSSECEnabled
Whether DNSSEC is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ForwardMode
The forwarding mode for the DNS server (forward, resolver, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -StrictBindingEnabled
Whether strict binding is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AllQueryLogEnabled
Whether to log all DNS queries.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RegisterIPv4
Whether to register IPv4 addresses.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RegisterIPv6
Whether to register IPv6 addresses.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSv6PrefixEnabled
Whether DNSv6 prefix is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PreferIPv4
Whether to prefer IPv4.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PreferIPv6
Whether to prefer IPv6.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the modified DNS server settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying DNS server settings, the DNS server service may need to be restarted.
## RELATED LINKS
[Get-OPNSenseDNSServer](Get-OPNSenseDNSServer.md)
[Get-OPNSenseSystemDNS](Get-OPNSenseSystemDNS.md)
[Set-OPNSenseSystemDNS](Set-OPNSenseSystemDNS.md)
+330
View File
@@ -0,0 +1,330 @@
# Set-OPNSenseFirewallRule
## SYNOPSIS
Modifies an existing firewall rule on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseFirewallRule -UUID <String> [-Action <String>] [-Interface <String>] [-Protocol <String>] [-Source <String>]
[-SourcePort <String>] [-Destination <String>] [-DestinationPort <String>] [-Description <String>]
[-Enabled <Boolean>] [-Direction <String>] [-IPProtocol <String>] [-Gateway <String>] [-Log <Boolean>]
[-Sequence <Int32>] [-Category <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseFirewallRule cmdlet modifies an existing firewall rule on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a firewall rule
```powershell
Set-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated rule description" -Log $true
```
This example updates the description and enables logging for an existing firewall rule.
### Example 2: Modify multiple properties of a firewall rule
```powershell
Set-OPNSenseFirewallRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Action "block" -Protocol "tcp/udp" -DestinationPort "3389,5900" -Description "Block remote access"
```
This example updates multiple properties of an existing firewall rule to block remote access protocols.
## PARAMETERS
### -UUID
The UUID of the firewall rule to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Action
The action to take for the rule (pass, block, reject).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Interface
The interface to apply the rule to.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Protocol
The protocol for the rule (tcp, udp, tcp/udp, icmp, etc.).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Source
The source address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourcePort
The source port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Destination
The destination address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationPort
The destination port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the rule is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Direction
The direction for the rule (in, out).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPProtocol
The IP protocol version for the rule (inet, inet6).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to use for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Log
Whether to log matches for the rule.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sequence
The sequence number for the rule.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Category
The category for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a firewall rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified firewall rule.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying firewall rules, you need to apply the changes using Apply-OPNSenseFirewallChanges.
## RELATED LINKS
[Get-OPNSenseFirewallRule](Get-OPNSenseFirewallRule.md)
[New-OPNSenseFirewallRule](New-OPNSenseFirewallRule.md)
[Remove-OPNSenseFirewallRule](Remove-OPNSenseFirewallRule.md)
[Enable-OPNSenseFirewallRule](Enable-OPNSenseFirewallRule.md)
[Disable-OPNSenseFirewallRule](Disable-OPNSenseFirewallRule.md)
[Apply-OPNSenseFirewallChanges](Apply-OPNSenseFirewallChanges.md)
+220
View File
@@ -0,0 +1,220 @@
# Set-OPNSenseGateway
## SYNOPSIS
Modifies an existing gateway on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseGateway -Name <String> [-Interface <String>] [-IPv4Address <String>] [-Description <String>] [-Priority <Int32>]
[-Weight <Int32>] [-Disabled <Boolean>] [-Monitor <Boolean>] [-MonitorIP <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseGateway cmdlet modifies an existing gateway on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a gateway description
```powershell
Set-OPNSenseGateway -Name "WAN_GW" -Description "Updated WAN Gateway"
```
This example updates the description of the gateway named "WAN_GW".
### Example 2: Enable monitoring for a gateway
```powershell
Set-OPNSenseGateway -Name "WAN_GW" -Monitor $true -MonitorIP "8.8.8.8"
```
This example enables monitoring for the gateway named "WAN_GW" and sets the monitoring IP to 8.8.8.8.
## PARAMETERS
### -Name
The name of the gateway to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Interface
The interface for the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv4Address
The IPv4 address of the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the gateway.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Priority
The priority of the gateway (1-255, lower is higher priority).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Weight
The weight of the gateway for load balancing.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the gateway is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Monitor
Whether to monitor the gateway.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MonitorIP
The IP address to monitor for gateway status.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the name of a gateway to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified gateway.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a gateway, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseGateway](Get-OPNSenseGateway.md)
[New-OPNSenseGateway](New-OPNSenseGateway.md)
[Remove-OPNSenseGateway](Remove-OPNSenseGateway.md)
+220
View File
@@ -0,0 +1,220 @@
# Set-OPNSenseInterface
## SYNOPSIS
Modifies an existing network interface on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseInterface -Name <String> [-Enabled <Boolean>] [-IPv4Type <String>] [-IPv4Address <String>] [-IPv4Subnet <Int32>]
[-IPv6Type <String>] [-IPv6Address <String>] [-IPv6Subnet <Int32>] [-Description <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseInterface cmdlet modifies an existing network interface on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify an interface
```powershell
Set-OPNSenseInterface -Name "lan" -Description "Local Area Network" -IPv4Address "192.168.1.1" -IPv4Subnet 24
```
This example updates the description and IPv4 address/subnet for the LAN interface.
### Example 2: Disable an interface
```powershell
Set-OPNSenseInterface -Name "opt1" -Enabled $false
```
This example disables the opt1 interface.
## PARAMETERS
### -Name
The name of the interface to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Enabled
Whether the interface is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv4Type
The IPv4 configuration type (none, static, dhcp).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv4Address
The IPv4 address for the interface.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv4Subnet
The IPv4 subnet mask (CIDR notation) for the interface.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv6Type
The IPv6 configuration type (none, static, dhcp6).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv6Address
The IPv6 address for the interface.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IPv6Subnet
The IPv6 subnet mask (CIDR notation) for the interface.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the interface.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the name of an interface to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified interface.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying an interface, you may need to restart it using Restart-OPNSenseInterface.
## RELATED LINKS
[Get-OPNSenseInterface](Get-OPNSenseInterface.md)
[Restart-OPNSenseInterface](Restart-OPNSenseInterface.md)
[Get-OPNSenseInterfaceStatistics](Get-OPNSenseInterfaceStatistics.md)
@@ -0,0 +1,275 @@
# Set-OPNSensePortForwardingRule
## SYNOPSIS
Modifies an existing port forwarding rule on an OPNSense firewall.
## SYNTAX
```
Set-OPNSensePortForwardingRule -UUID <String> [-Interface <String>] [-Protocol <String>] [-SourceAddress <String>]
[-SourcePort <String>] [-DestinationAddress <String>] [-DestinationPort <String>]
[-TargetIP <String>] [-TargetPort <String>] [-Description <String>] [-Enabled <Boolean>]
[-NATReflection <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSensePortForwardingRule cmdlet modifies an existing port forwarding rule on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a port forwarding rule description
```powershell
Set-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated Web Server"
```
This example updates the description of an existing port forwarding rule.
### Example 2: Change the target IP for a port forwarding rule
```powershell
Set-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -TargetIP "192.168.1.11"
```
This example changes the internal IP address to which traffic is forwarded.
### Example 3: Disable a port forwarding rule
```powershell
Set-OPNSensePortForwardingRule -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Enabled $false
```
This example disables an existing port forwarding rule.
## PARAMETERS
### -UUID
The UUID of the port forwarding rule to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Interface
The interface on which the rule applies.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Protocol
The protocol for the rule (tcp, udp, tcp/udp).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourceAddress
The source address or network for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SourcePort
The source port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationAddress
The destination address for the rule (usually "WAN address").
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DestinationPort
The destination port for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TargetIP
The internal IP address to which traffic will be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TargetPort
The internal port to which traffic will be forwarded.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the rule.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Whether the rule is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -NATReflection
The NAT reflection mode for the rule (enable, disable, system default).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a port forwarding rule to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified port forwarding rule.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a port forwarding rule, you may need to apply the changes for them to take effect.
Modifying port forwarding rules may require corresponding changes to firewall rules.
## RELATED LINKS
[Get-OPNSensePortForwardingRule](Get-OPNSensePortForwardingRule.md)
[New-OPNSensePortForwardingRule](New-OPNSensePortForwardingRule.md)
[Remove-OPNSensePortForwardingRule](Remove-OPNSensePortForwardingRule.md)
+167
View File
@@ -0,0 +1,167 @@
# Set-OPNSenseRoute
## SYNOPSIS
Modifies an existing static route on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseRoute -UUID <String> [-Network <String>] [-Gateway <String>] [-Description <String>] [-Disabled <Boolean>]
[-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseRoute cmdlet modifies an existing static route on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a static route description
```powershell
Set-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated Route Description"
```
This example updates the description of an existing static route.
### Example 2: Change the gateway for a static route
```powershell
Set-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Gateway "Backup_WAN"
```
This example changes the gateway used for an existing static route.
### Example 3: Disable a static route
```powershell
Set-OPNSenseRoute -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Disabled $true
```
This example disables an existing static route.
## PARAMETERS
### -UUID
The UUID of the route to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Network
The destination network in CIDR notation.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Gateway
The gateway to use for the route.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the route.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the route is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a route to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified static route.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying a static route, you may need to apply the changes for them to take effect.
## RELATED LINKS
[Get-OPNSenseRoute](Get-OPNSenseRoute.md)
[New-OPNSenseRoute](New-OPNSenseRoute.md)
[Remove-OPNSenseRoute](Remove-OPNSenseRoute.md)
+113
View File
@@ -0,0 +1,113 @@
# Set-OPNSenseSystemDNS
## SYNOPSIS
Modifies system DNS settings on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseSystemDNS [-DNSServers <String[]>] [-DNSSearchDomains <String[]>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseSystemDNS cmdlet modifies system DNS settings on an OPNSense firewall, including DNS servers and domain search list.
## EXAMPLES
### Example 1: Set system DNS servers
```powershell
Set-OPNSenseSystemDNS -DNSServers "8.8.8.8", "8.8.4.4"
```
This example sets the system DNS servers to Google's public DNS servers.
### Example 2: Set system DNS servers and search domains
```powershell
Set-OPNSenseSystemDNS -DNSServers "192.168.1.10", "192.168.1.11" -DNSSearchDomains "example.com", "local.example.com"
```
This example sets both the system DNS servers and search domains.
## PARAMETERS
### -DNSServers
The DNS servers to use for system DNS resolution.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DNSSearchDomains
The domain search list for DNS resolution.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the modified system DNS settings.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
After modifying system DNS settings, the system may need to be restarted for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseSystemDNS](Get-OPNSenseSystemDNS.md)
[Get-OPNSenseDNSServer](Get-OPNSenseDNSServer.md)
[Set-OPNSenseDNSServer](Set-OPNSenseDNSServer.md)
+184
View File
@@ -0,0 +1,184 @@
# Set-OPNSenseTailscaleConfig
## SYNOPSIS
Modifies the Tailscale configuration on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseTailscaleConfig [-AuthKey <String>] [-Hostname <String>] [-AdvertiseRoutes <String[]>] [-AcceptRoutes <Boolean>]
[-ExitNode <Boolean>] [-ExitNodeAllowLAN <Boolean>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseTailscaleConfig cmdlet modifies the Tailscale configuration on an OPNSense firewall, including settings such as authentication key, advertised routes, and exit node configuration.
## EXAMPLES
### Example 1: Set the Tailscale authentication key
```powershell
Set-OPNSenseTailscaleConfig -AuthKey "tskey-auth-abcdefghijklmnopqrstuvwxyz"
```
This example sets the Tailscale authentication key.
### Example 2: Configure Tailscale to advertise routes
```powershell
Set-OPNSenseTailscaleConfig -AdvertiseRoutes "192.168.1.0/24", "10.0.0.0/8"
```
This example configures Tailscale to advertise specific subnet routes.
### Example 3: Configure Tailscale as an exit node
```powershell
Set-OPNSenseTailscaleConfig -ExitNode $true -ExitNodeAllowLAN $true
```
This example configures Tailscale to act as an exit node, allowing access to LAN resources.
## PARAMETERS
### -AuthKey
The Tailscale authentication key.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Hostname
The hostname to use for the Tailscale node.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AdvertiseRoutes
The subnet routes to advertise to the Tailscale network.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AcceptRoutes
Whether to accept subnet routes from other Tailscale nodes.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExitNode
Whether to configure this node as a Tailscale exit node.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExitNodeAllowLAN
Whether to allow access to LAN resources when acting as an exit node.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
The Tailscale plugin must be installed on the OPNSense firewall.
After modifying the configuration, you may need to restart Tailscale for the changes to take effect.
## RELATED LINKS
[Get-OPNSenseTailscaleConfig](Get-OPNSenseTailscaleConfig.md)
[Enable-OPNSenseTailscale](Enable-OPNSenseTailscale.md)
[Disable-OPNSenseTailscale](Disable-OPNSenseTailscale.md)
[Get-OPNSenseTailscaleStatus](Get-OPNSenseTailscaleStatus.md)
[Install-OPNSenseTailscale](Install-OPNSenseTailscale.md)
+221
View File
@@ -0,0 +1,221 @@
# Set-OPNSenseUser
## SYNOPSIS
Modifies an existing user on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseUser -Username <String> [-Password <SecureString>] [-FullName <String>] [-Email <String>] [-Comment <String>]
[-Disabled <Boolean>] [-ExpireDate <DateTime>] [-AuthGroup <String[]>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseUser cmdlet modifies an existing user on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a user's email address
```powershell
Set-OPNSenseUser -Username "existinguser" -Email "newemail@example.com"
```
This example updates the email address for the user "existinguser".
### Example 2: Change a user's password
```powershell
$newPassword = ConvertTo-SecureString "NewP@ssw0rd" -AsPlainText -Force
Set-OPNSenseUser -Username "existinguser" -Password $newPassword
```
This example changes the password for the user "existinguser".
### Example 3: Disable a user account
```powershell
Set-OPNSenseUser -Username "existinguser" -Disabled $true
```
This example disables the account for the user "existinguser".
### Example 4: Update a user's authorization groups
```powershell
Set-OPNSenseUser -Username "existinguser" -AuthGroup "users", "vpnusers"
```
This example updates the authorization groups for the user "existinguser".
## PARAMETERS
### -Username
The username of the user to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Password
The new password for the user as a SecureString.
```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FullName
The full name of the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Email
The email address of the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Comment
A comment or description for the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disabled
Whether the user account is disabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExpireDate
The date when the user account will expire.
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AuthGroup
The authorization groups to which the user belongs.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the username to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified user.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
For security reasons, it is recommended to use a SecureString for the password parameter.
Be careful when modifying the "admin" user, as this could lock you out of the firewall.
## RELATED LINKS
[Get-OPNSenseUser](Get-OPNSenseUser.md)
[New-OPNSenseUser](New-OPNSenseUser.md)
[Remove-OPNSenseUser](Remove-OPNSenseUser.md)
+160
View File
@@ -0,0 +1,160 @@
# Set-OPNSenseVLAN
## SYNOPSIS
Modifies an existing VLAN on an OPNSense firewall.
## SYNTAX
```
Set-OPNSenseVLAN -UUID <String> [-Device <String>] [-Tag <Int32>] [-Priority <Int32>] [-Description <String>] [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Set-OPNSenseVLAN cmdlet modifies an existing VLAN on an OPNSense firewall.
## EXAMPLES
### Example 1: Modify a VLAN description
```powershell
Set-OPNSenseVLAN -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Description "Updated VLAN description"
```
This example updates the description of an existing VLAN.
### Example 2: Modify a VLAN priority
```powershell
Set-OPNSenseVLAN -UUID "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Priority 7
```
This example updates the priority of an existing VLAN.
## PARAMETERS
### -UUID
The UUID of the VLAN to modify.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Device
The physical interface for the VLAN.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Tag
The VLAN tag (1-4094).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Priority
The VLAN priority (0-7).
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
A description for the VLAN.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
You can pipe a string containing the UUID of a VLAN to this cmdlet.
## OUTPUTS
### System.Object
Returns an object representing the modified VLAN.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Modifying a VLAN may affect network connectivity for devices using that VLAN.
## RELATED LINKS
[Get-OPNSenseVLAN](Get-OPNSenseVLAN.md)
[New-OPNSenseVLAN](New-OPNSenseVLAN.md)
[Remove-OPNSenseVLAN](Remove-OPNSenseVLAN.md)
[New-OPNSenseSubnetVLANs](New-OPNSenseSubnetVLANs.md)
@@ -0,0 +1,84 @@
# Start-OPNSenseFirmwareUpgrade
## SYNOPSIS
Starts a firmware upgrade on an OPNSense firewall.
## SYNTAX
```
Start-OPNSenseFirmwareUpgrade [-WhatIf] [-Confirm]
```
## DESCRIPTION
The Start-OPNSenseFirmwareUpgrade cmdlet starts a firmware upgrade on an OPNSense firewall. This cmdlet performs a major version upgrade, not just an update.
## EXAMPLES
### Example 1: Start a firmware upgrade
```powershell
Start-OPNSenseFirmwareUpgrade
```
This example starts a firmware upgrade on the OPNSense firewall.
### Example 2: Start a firmware upgrade with confirmation
```powershell
Start-OPNSenseFirmwareUpgrade -Confirm
```
This example prompts for confirmation before starting the firmware upgrade.
## PARAMETERS
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
Returns an object representing the result of the operation.
## NOTES
This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection.
Upgrading the firmware will require a reboot of the firewall for the changes to take effect.
It is strongly recommended to create a backup of the firewall configuration before upgrading the firmware.
This cmdlet performs a major version upgrade, which may have significant changes and potential compatibility issues.
## RELATED LINKS
[Get-OPNSenseFirmware](Get-OPNSenseFirmware.md)
[Update-OPNSenseFirmware](Update-OPNSenseFirmware.md)

Some files were not shown because too many files have changed in this diff Show More