Fix: Use alias for args name on config generation
In case we are using aliases for command arguments/parameters, we should always use the first alias we find as argument instead of using the real name.
Fix: Check command generator for aliases
In case we are using aliases for check commands, to keep backwards compatibility, we have to ensure that check commands actually use the name of the alias for custom variables, to not break the naming and prevent wrong usage of custom variables.
Fix: Module not loaded exception
Fixes an exception, telling the user a module is not loaded or installed, while the check itself returned a false value.
However, this check in general is useless and should be removed, as we can only check for components being loaded already, making it impossible to verify that a command is not available and loading the corresponding module, as we are unable to detect which module belongs to the command.
Therefor the entire test for this just causes CPU overhead and loading time for nothing.
Feature: Move REST-Api and Aoi-Checks into Framework
As the long-term goal will be to move away from check execution with local PowerShell instances, we move the REST-Api and Api-Checks feature directly into the Framework.
By adding everything directly into the Framework, we ensure that no side-loading of modules is required and we can use the API and checker features to increase performance by a lot and provide direct setup and installation procedures inside the IMC.
Fix: IMC error handling on invalid JSON for install command/file
Fixes error handling for IMC on automated installation with installation command or answer file, which will not abort the installation in case invalid JSON is provided or commands are used inside the command, not valid or exist on the system.
The system will write an error message and abort the installation in case of initial errors now.
Fix: Exception on last uninstall message print
Fixes an exception on the last message output while running `Uninstall-IcingaForWindows`, as the used function is no longer available due to Framework uninstallation.
We now replaced the last messages with proper `Write-Host` output
Fix: Repository names with dots fail to load
Fixes repository names with dots (`.`) by replacing them with `-`, as otherwise the config parser will fail finding the config object
Fix: IMC summary header has misleading title
Fixes misleading title for IMC summary header, which implies the installation instantly starts on continue, instead of notifying properly about the installation being started on the next step including the export of the answer file and install command.
Fix: Repository lookup on local path for ifw.repo.json
Fixes lookup for local ifw.repo.json, in case the path was specified with `ifw.repo.json` included, like `C:\icinga\stable\ifw.repo.json`
Fix: Icinga Director state not being saved on overview
In case the Icinga Director host is registered in the IMC over the Self-Service API, the menu is defaulting to the message "Do not register host" instead of displaying the correct configuration.
This is only a displaying issue and has no technical impact, but we still need to fix that.
Fix: Icinga environment corruption on Icinga Agent installation failure
In case the Icinga Agent could not be installed, regardless of the reason, we should not write any zone, api or other related config to the environment.
By doing so, we can corrupt the environment and make it impossible for the Icinga Agent to be installed in the future, unless we manually delete the folowing directories:
* `C:\ProgramData\icinga2`
* `C:\Program Files\ICINGA2`
* `C:\Program Files (x86)\ICINGA2` (only for x86 installations)
Fix: Repository component install from file share
The installation from file share locations will fail, in case no `LocalPath` is assigned to the repository configuration and is also failing by invalid escaping of the path.
This is now fixed as the `RemotePath` is the only one being required and in addition downloads from file shares of component packages is now working as intended.
Fix: IMC fails on Icinga Director Self-Service no Agent installation set
In case you are using the IMC and the Icinga Director Self-Service API, it can happen that once entered the Self-Service API key, the shell will only look like this:
```
Input (Default 0 and c ):
```
Without any other form content.
This occured, in case inside the Self-Service API config the entry `Installation Source` was set to `- no automatic installation -`.
This fix resolves the issue and renders the form including the settings correctly.
Fix: Plain Plugin Cmdlet execution on shell
Fixes plain execution of plugin Cmdlets on the PowerShell, which caused an exception of being thrown before, as no check command was assigned.