Skip to content

Commit 6598eb0

Browse files
committed
Fixes install icinga security for admin shell
1 parent d8e87b9 commit 6598eb0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

doc/100-General/10-Changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
3737
* [#452](https://github.com/Icinga/icinga-powershell-framework/pull/452) Fixes unhandled `true` output on the console while running the installer
3838
* [#454](https://github.com/Icinga/icinga-powershell-framework/pull/454) Fixes JEA catalog compiler and background daemon execution in JEA context
3939
* [#456](https://github.com/Icinga/icinga-powershell-framework/pull/456) Fixes JEA service error count not resetting itself after a certain amount of time without errors
40+
* [#458](https://github.com/Icinga/icinga-powershell-framework/pull/458) Fixes `Install-IcingaSecurity` which should only run in an administrative shell
4041

4142
### Enhancements
4243

lib/core/windows/Install-IcingaSecurity.psm1

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ function Install-IcingaSecurity()
1212
return;
1313
}
1414

15+
if ((Test-AdministrativeShell) -eq $FALSE) {
16+
Write-IcingaConsoleError -Message 'This command can only be executed from an administrative shell';
17+
return;
18+
}
19+
1520
# Max length for the user name
1621
if ($IcingaUser.Length -gt 20) {
1722
Write-IcingaConsoleError 'The specified user name "{0}" is too long. The maximum character limit is 20 digits.' -Objects $IcingaUser;

0 commit comments

Comments
 (0)