mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Fixes usage for domain accounts for wmi permission
This commit is contained in:
parent
0618d30d99
commit
17e320d3da
2 changed files with 1 additions and 7 deletions
|
|
@ -45,6 +45,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
* [#165](https://github.com/Icinga/icinga-powershell-framework/pull/165) Fixes fetching for Icinga Agent certificate for REST-Api daemon on upper/lower case hostname mismatch
|
* [#165](https://github.com/Icinga/icinga-powershell-framework/pull/165) Fixes fetching for Icinga Agent certificate for REST-Api daemon on upper/lower case hostname mismatch
|
||||||
* [#166](https://github.com/Icinga/icinga-powershell-framework/pull/166) Fixes fetching of Icinga Agent MSI packages by correctly comparing versions to ensure we always use the latest version and fixes `release` usage for local/network drive sources
|
* [#166](https://github.com/Icinga/icinga-powershell-framework/pull/166) Fixes fetching of Icinga Agent MSI packages by correctly comparing versions to ensure we always use the latest version and fixes `release` usage for local/network drive sources
|
||||||
* [#167](https://github.com/Icinga/icinga-powershell-framework/pull/167) Fixes error while writing EventLog entries with too large message size
|
* [#167](https://github.com/Icinga/icinga-powershell-framework/pull/167) Fixes error while writing EventLog entries with too large message size
|
||||||
|
* [#177](https://github.com/Icinga/icinga-powershell-framework/pull/177) Fixes Wmi permissions to allow domain accounts while not being locally known on the system
|
||||||
|
|
||||||
## 1.2.0 (2020-08-28)
|
## 1.2.0 (2020-08-28)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,6 @@ function Get-IcingaWmiSecurityData()
|
||||||
$UserSID = Get-IcingaUserSID -User $User;
|
$UserSID = Get-IcingaUserSID -User $User;
|
||||||
$WmiAcl = $WmiSecurityData.Descriptor;
|
$WmiAcl = $WmiSecurityData.Descriptor;
|
||||||
|
|
||||||
$WmiAccount = Get-IcingaWindowsInformation -ClassName Win32_Account -Filter ([string]::Format("Domain='{0}' and Name='{1}'", $UserData.Domain, $UserData.User));
|
|
||||||
|
|
||||||
if ($null -eq $WmiAccount) {
|
|
||||||
Write-IcingaConsoleError 'The specified user could not be found on the system: "{0}\{1}"' -Objects $UserData.Domain, $UserData.User;
|
|
||||||
return $null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($UserSID)) {
|
if ([string]::IsNullOrEmpty($UserSID)) {
|
||||||
Write-IcingaConsoleError 'Unable to load the SID for user "{0}"' -Objects $User;
|
Write-IcingaConsoleError 'Unable to load the SID for user "{0}"' -Objects $User;
|
||||||
return $null;
|
return $null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue