-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] - Health Checker computer group membership check #2128
Comments
Using Line 207 in 0848d67
The reason being is because we are inside a But if we are having issues with running that cmdlet in locked down environments, we will need to attempt to add in a catch for this as well. This would be similar to issue #2110 where the other cmdlet is also failing in some environments. |
Thank you for your quick response, David. Okay, I haven't thinked of the ScriptBlock behaviour. Sorry. Looks like it must be wrong. I would suggest to check if it might be possible to modify it for hardened environments try { This might fix it. |
That is interesting that We are going to need to do a little more than just what you provided, as we need to be able to get the SID and should really try to make sure we get all the same properties that we would have gotten from |
The thing with Domain Computers could be because of AD hardening. I compared the output of the Get-ADPrincipalGroupMembership variants. The output of Get-ADcomputer has the properties GroupCategory and GroupScope missing. If replaced with Get-ADGroup the Output properties are the same. |
Am seeing this when running the Health Checker (Version 24.08.08.1523) against our 'Exchange 2019 CU14 Apr24HU' server installed on Core. Exchange Server Membership | Unknown - Wasn't able to get the Computer Membership information The command on line 13654 runs without issue. Please advise. |
According to this page it seems the Active Directory PowerShell module is used to make this command work: For me: HC Script running on server without AD PowerShell module installed:
HC Script running on server with AD PowerShell module installed:
Also it seems that My suggestion is adding some sort of check for the availability of the AD PowerShell module and a reworked routine so it can be run on a computer with the AD module installed and a remote target server (-server parameter). That of course if I got things right in the first place :). |
I have experimented with some workarounds for our environment and found an possible patch. Or even an starting point for an patch... @grimson73 , @ltoddnelson feel free to test if the following solves your Problems.
|
Hi, thanks for helping.
My issue is that the Active Directory PowerShell module isn't installed so i think 'Get-ADComputer' doesn't work in the replacement part. But thanks again! I think the original HC-Script does assume the AD PS Module is installed but when it's not it doesn't notify the user but does give the 'unkown' warning message leaving the user confused about what is happening, I guess. |
Provide Version Number
24.06.24.2018
Describe the issue
New Group Membership check uses $env:computername instead of $server, and suggestion for hardened ADs
Expected behavior
Get Membership of wanted server
Script Output
Membership of computer executing the script to check remote server
Additional context
Look at code starting in line 13480. I would suggest to replace $env:computername with $server.
In Addition, in our hardened Activ Directory the cmdlet Get-ADPrincipalGroupMembership dos not work. i would suggest using Get-ADComputer $server -Properties memberof | select -ExpandProperty memberof which works if global group membership search is prohibited in the Active Directory
The text was updated successfully, but these errors were encountered: