mirror of
https://github.com/freedbygrace/PSOPNSenseAPI.git
synced 2026-08-27 19:06:47 +00:00
Fix cmdlet name conflict by renaming Upgrade-OPNSenseFirmware to Start-OPNSenseFirmwareUpgrade
This commit is contained in:
@@ -102,10 +102,12 @@
|
|||||||
'Set-OPNSenseVLAN',
|
'Set-OPNSenseVLAN',
|
||||||
'Uninstall-OPNSensePlugin',
|
'Uninstall-OPNSensePlugin',
|
||||||
'Update-OPNSenseFirmware',
|
'Update-OPNSenseFirmware',
|
||||||
'Upgrade-OPNSenseFirmware'
|
'Start-OPNSenseFirmwareUpgrade'
|
||||||
)
|
)
|
||||||
VariablesToExport = @()
|
VariablesToExport = @()
|
||||||
AliasesToExport = @()
|
AliasesToExport = @()
|
||||||
|
RequiredAssemblies = @('lib\System.Net.IPNetwork.dll', 'lib\Newtonsoft.Json.dll')
|
||||||
|
NestedModules = @('lib\PSOPNSenseAPI.dll')
|
||||||
PrivateData = @{
|
PrivateData = @{
|
||||||
PSData = @{
|
PSData = @{
|
||||||
Tags = @('PowerShell', 'OPNSense', 'Firewall', 'API')
|
Tags = @('PowerShell', 'OPNSense', 'Firewall', 'API')
|
||||||
|
|||||||
@@ -1,13 +1,2 @@
|
|||||||
# Load the main assembly directly
|
# This file is intentionally empty.
|
||||||
$mainDllPath = Join-Path $PSScriptRoot "lib\PSOPNSenseAPI.dll"
|
# The module uses NestedModules in the PSD1 file to load the assemblies.
|
||||||
|
|
||||||
Write-Verbose "Loading assembly from $mainDllPath"
|
|
||||||
|
|
||||||
try {
|
|
||||||
Add-Type -Path $mainDllPath
|
|
||||||
Write-Verbose "Successfully loaded assembly from $mainDllPath"
|
|
||||||
} catch {
|
|
||||||
$errorMessage = $_.Exception.Message
|
|
||||||
Write-Error "Failed to load assembly from $($mainDllPath): $($errorMessage)"
|
|
||||||
throw
|
|
||||||
}
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Management.Automation;
|
using System.Management.Automation;
|
||||||
|
using System.Management.Automation.Runspaces;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using PSOPNSenseAPI.Services;
|
using PSOPNSenseAPI.Services;
|
||||||
@@ -20,7 +21,7 @@ namespace PSOPNSenseAPI.Cmdlets
|
|||||||
/// <para>This example upgrades the firmware on the OPNSense firewall and waits for the upgrade to complete.</para>
|
/// <para>This example upgrades the firmware on the OPNSense firewall and waits for the upgrade to complete.</para>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Cmdlet(VerbsData.Update, "OPNSenseFirmware", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)]
|
[Cmdlet(VerbsLifecycle.Start, "OPNSenseFirmwareUpgrade", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)]
|
||||||
[OutputType(typeof(void))]
|
[OutputType(typeof(void))]
|
||||||
public class UpgradeOPNSenseFirmwareCmdlet : OPNSenseBaseCmdlet
|
public class UpgradeOPNSenseFirmwareCmdlet : OPNSenseBaseCmdlet
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
'Set-OPNSenseVLAN',
|
'Set-OPNSenseVLAN',
|
||||||
'Uninstall-OPNSensePlugin',
|
'Uninstall-OPNSensePlugin',
|
||||||
'Update-OPNSenseFirmware',
|
'Update-OPNSenseFirmware',
|
||||||
'Upgrade-OPNSenseFirmware'
|
'Start-OPNSenseFirmwareUpgrade'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Variables to export from this module
|
# Variables to export from this module
|
||||||
|
|||||||
Reference in New Issue
Block a user