You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #650 from Icinga:feature/adds_support_to_run_icinga_while_creating_no_new_instance
Feature: Adds support to not load a new PowerShell instance for command icinga
Adds support to run command `icinga` with new argument `-NoNewInstance`, to use `-RebuildCache` as example to update the current PowerShell instance with all applied changes, instead of create a new shell instance.
Does not support the argument `-DeveloperMode` in the same call, as Icinga for Window is dependent on these files for the current session.
Copy file name to clipboardExpand all lines: doc/100-General/10-Changelog.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
25
25
### Enhancements
26
26
27
27
*[#544](https://github.com/Icinga/icinga-powershell-framework/issues/544) Adds support to configure the Icinga Director JSON string for registering hosts via self-service API
28
+
*[#573](https://github.com/Icinga/icinga-powershell-framework/issues/573) Adds support to run command `icinga` with new argument `-NoNewInstance`, to use `-RebuildCache` as example to update the current PowerShell instance with all applied changes
28
29
*[#619](https://github.com/Icinga/icinga-powershell-framework/pull/619) Adds feature to securely read enum provider values with new function `Get-IcingaProviderEnumData`
29
30
*[#623](https://github.com/Icinga/icinga-powershell-framework/issues/623) Adds support to provide the Icinga service user written as `user@domain`
30
31
*[#633](https://github.com/Icinga/icinga-powershell-framework/pull/633) Adds support for Icinga 2.14.0 native Icinga for Windows API communication
# Try to re-import everything within the same instance
314
+
if ($NoNewInstance) {
315
+
Import-IcingaForWindowsModules;
316
+
Use-Icinga;
317
+
318
+
return;
319
+
}
320
+
288
321
if ($null-ne$psISE) {
289
322
Use-Icinga;
290
323
Write-IcingaConsoleError-Message 'Icinga for Windows was loaded, but the Icinga Management Console is not available within the PowerShell ISE context. Please start a regular PowerShell to use it.';
0 commit comments