ClaudioMerola / ADxRay

Active Directory's Health Check script that generates a full HTML report of the environment's health, security and status based on Microsoft's Best Practices.
GNU General Public License v3.0
93 stars 37 forks source link

DC Inventory #2

Closed rebelinux closed 2 years ago

rebelinux commented 2 years ago

Hello,

First of all great script, I run it in my environment but I can't get it to generate the DC inventory section.

Happy bug hunting!

No_DC_Inventory

rebelinux commented 2 years ago

Forgot to mention that the other part of the script run fine.

ClaudioMerola commented 2 years ago

Hello,

Can you try to run the following powershell command from the machine where you are running the ADxRay?

Invoke-Command -cn 'NameOfSomeDC' -ScriptBlock {systeminfo /fo CSV | ConvertFrom-Csv}

Don't forget to change the 'NameOfSomeDC' to any Domain Controller in your environment.

I believe there is some AV or policy blocking some remoting powershell. That's the command the script is running to collect that information.

ClaudioMerola commented 2 years ago

Anyways I added a backup way for the script to get that information.

Can you try the version 5.6.5 and see how it goes?

Thanks

rebelinux commented 2 years ago

Invoke-Command -cn 'NameOfSomeDC' -ScriptBlock {systeminfo /fo CSV | ConvertFrom-Csv}

PS C:\Users\jocolon> Invoke-Command -cn 'server-dc-01v.pharmax.local' -ScriptBlock {systeminfo /fo CSV | ConvertFrom-Csv}

Host Name                 : SERVER-DC-01V
OS Name                   : Microsoft Windows Server 2019 Standard
OS Version                : 10.0.17763 N/A Build 17763
OS Manufacturer           : Microsoft Corporation
OS Configuration          : Primary Domain Controller
OS Build Type             : Multiprocessor Free
Registered Owner          : Jonathan Colon
Registered Organization   : PHARMAX
Product ID                : 00429-70000-00000-AA764
Original Install Date     : 9/8/2020, 9:20:17 PM
System Boot Time          : 8/4/2022, 10:08:44 AM
System Manufacturer       : VMware, Inc.
System Model              : VMware7,1
System Type               : x64-based PC
Processor(s)              : 1 Processor(s) Installed.,[01]: Intel64 Family 6 Model 94 Stepping 3 GenuineIntel ~3408 Mhz
BIOS Version              : VMware, Inc. VMW71.00V.18227214.B64.2106252220, 6/25/2021
Windows Directory         : C:\Windows
System Directory          : C:\Windows\system32
Boot Device               : \Device\HarddiskVolume2
System Locale             : en-us;English (United States)
Input Locale              : en-us;English (United States)
Time Zone                 : (UTC-04:00) Georgetown, La Paz, Manaus, San Juan
Total Physical Memory     : 4,095 MB
Available Physical Memory : 2,336 MB
Virtual Memory: Max Size  : 4,799 MB
Virtual Memory: Available : 2,794 MB
Virtual Memory: In Use    : 2,005 MB
Page File Location(s)     : C:\pagefile.sys
Domain                    : pharmax.local
Logon Server              : N/A
Hotfix(s)                 : 27 Hotfix(s) Installed.,[01]: KB5013892,[02]: KB4512577,[03]: KB4523204,[04]: KB4535680,[05]: KB4549947,[06]: KB4566424,[07]: KB4570332,[08]: KB4577667,[09]: KB4587735,[10]: KB4589208,[11]: KB4598480,[12]: KB4601393,[13]:
                            KB5000859,[14]: KB5001404,[15]: KB5003243,[16]: KB5003711,[17]: KB5005112,[18]: KB5015811,[19]: KB5006754,[20]: KB5008539,[21]: KB5008287,[22]: KB5009642,[23]: KB5011574,[24]: KB5012675,[25]: KB5014031,[26]: KB5014797,[27]: KB5005701
Network Card(s)           : 1 NIC(s) Installed.,[01]: vmxnet3 Ethernet Adapter,      Connection Name: Ethernet0,      DHCP Enabled:    No,      IP address(es),      [01]: 192.168.5.1
Hyper-V Requirements      : A hypervisor has been detected. Features required for Hyper-V will not be displayed.
PSComputerName            : server-dc-01v.pharmax.local
RunspaceId                : f66e6484-dad8-4dff-a4a9-adfae644fbda

PS C:\Users\jocolon>

ClaudioMerola commented 2 years ago

Have you tested the version 5.6.8 of the script?

rebelinux commented 2 years ago

yes, did the test with latest release but same results. The DC xml file shows the hw inventory data.

rebelinux commented 2 years ago

Don't worry about the information. This is a HomeLab environment!

ADxRay.zip

ClaudioMerola commented 2 years ago

Ok, I found a bug to process the way the script process your bios information.

Can you give a try in the version 5.6.9?

Thanks

rebelinux commented 2 years ago

Now it works!. Only a minor issue from the Domain column

DC_HW

ClaudioMerola commented 2 years ago

Glad it worked.

I believe the missing domain was probabily a single failure during the inventory, can you run the script again and see if the same error occur?

rebelinux commented 2 years ago

Same result

ADxRay_New.zip

ClaudioMerola commented 2 years ago

oddly the information from the DCs of one of the domain is missing.

I changed back some things in the script. Can you try the version 5.6.10?

rebelinux commented 2 years ago

thanks for the help now all the information are displayed correctly

ADxRay_Report_2022-08-04.zip