From 433511597e9e07406b35557e3c83b535541ade11 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Wed, 24 Feb 2021 15:12:14 +0100 Subject: [PATCH] Renames uninstaller arg Component to Name --- lib/core/framework/Uninstall-IcingaForWindows.psm1 | 2 +- lib/core/framework/Uninstall-IcingaFrameworkComponent.psm1 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/framework/Uninstall-IcingaForWindows.psm1 b/lib/core/framework/Uninstall-IcingaForWindows.psm1 index db9da30..a1b77f0 100644 --- a/lib/core/framework/Uninstall-IcingaForWindows.psm1 +++ b/lib/core/framework/Uninstall-IcingaForWindows.psm1 @@ -55,7 +55,7 @@ function Uninstall-IcingaForWindows() foreach ($module in $ModuleList.Name) { [string]$ModuleName = $module.Replace('icinga-powershell-', ''); - if ((Uninstall-IcingaFrameworkComponent -Component $ModuleName)) { + if ((Uninstall-IcingaFrameworkComponent -Name $ModuleName)) { continue; } diff --git a/lib/core/framework/Uninstall-IcingaFrameworkComponent.psm1 b/lib/core/framework/Uninstall-IcingaFrameworkComponent.psm1 index 5ea436e..e88540f 100644 --- a/lib/core/framework/Uninstall-IcingaFrameworkComponent.psm1 +++ b/lib/core/framework/Uninstall-IcingaFrameworkComponent.psm1 @@ -8,7 +8,7 @@ .FUNCTIONALITY Uninstalls a specific module within the icinga-powershell-* namespace inside your PowerShell module folder -.PARAMETER Component +.PARAMETER Name The component you want to uninstall, like 'plugins' or 'mssql' .INPUTS System.String @@ -21,11 +21,11 @@ function Uninstall-IcingaFrameworkComponent() { param ( - [string]$Component + [string]$Name = '' ); $ModuleBase = Get-IcingaFrameworkRootPath; - $UninstallComponent = [string]::Format('icinga-powershell-{0}', $Component); + $UninstallComponent = [string]::Format('icinga-powershell-{0}', $Name); $UninstallPath = Join-Path -Path $ModuleBase -ChildPath $UninstallComponent; if ((Test-Path $UninstallPath) -eq $FALSE) {