AsBuiltReport / AsBuiltReport.Microsoft.AD

Repository for AsBuiltReport Microsoft Active Directory module
https://techmyth.blog/posts/homelab-ad-doc-using-asbuiltreport/
MIT License
63 stars 18 forks source link

Not getting user,computer or group objects #169

Closed walkersway closed 3 months ago

walkersway commented 4 months ago

Bug description

I have ran this from a remote server and directly on the domain controller. Using domain admin credentials.

Command-line input

New-AsBuiltReport -Report Microsoft.AD -Target 'xxxx.local' -Credential $Creds -Format Word -OutputFolderPath 'C:\Asbuilt' -ReportConfigFilePath 'C:\AsBuilt\AsBuiltReport.Microsoft.AD.json' -Verbose -EnableHealthCheck

Steps to reproduce

Open PowerShell as admin Run command Enter credentials in format domain\user at prompt

Expected behaviour

That it would pick up users, computers and groups.

Screenshots

user objects priv accounts computers groups stale users

Operating System

Windows 2019 Datacenter

PowerShell Version

Name Value


PSVersion 5.1.17763.5830 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.5830 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

PowerShell Modules

Name Version


AsBuiltReport.Core 1.4.0 AsBuiltReport.Microsoft.AD 0.8.1 PScribo 0.10.0 PScriboCharts 0.9.0 PSPKI 4.2.0

Additional Context

No response

Before submitting

rebelinux commented 4 months ago

Hello,

I assume the rest of the report works as expected?

Can your run the report again but this time with the verbose/debug option set globally so i can troubleshoot the module.

$global:VerbosePreference = 'Continue'
$global:DebugPreference = 'Continue'
Start-Transcript -Path .\Output.log
New-AsBuiltReport <-- your command here
Stop-Transcript

Remember to set its value to the default one after generating the log!

$global:VerbosePreference = 'SilentlyContinue'
$global:DebugPreference = 'SilentlyContinue'

The output.log can be attached here or if privacy is a concern you can send it to me at: jcolonf@zenprsolutions.com

Thanks!

walkersway commented 4 months ago

Hi,

I will see if I get chance over the weekend otherwise it will be Monday.

Mark

Sent from Ninehttp://www.9folders.com/


From: Jonathan Colon @.***> Sent: Friday, 7 June 2024 19:29 To: AsBuiltReport/AsBuiltReport.Microsoft.AD Cc: Mark Smith; Author Subject: Re: [AsBuiltReport/AsBuiltReport.Microsoft.AD] Not getting user,computer or group objects (Issue #169)

Hello,

I assume the rest of the report works as expected?

Can your run the report again but this time with the verbose/debug option set globally so i can troubleshoot the module.

$global:VerbosePreference = 'Continue' $global:DebugPreference = 'Continue' Start-Transcript -Path .\Output.log New-AsBuiltReport <-- your command here Stop-Transcript

Remember to set its value to the default one after generating the log!

$global:VerbosePreference = 'SilentlyContinue' $global:DebugPreference = 'SilentlyContinue'

The output.log can be attached here or if privacy is a concern you can send it to me at: @.**@.>

Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/169#issuecomment-2155322408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASKBBELDCSAWYXINUS7OVBLZGH3XLAVCNFSM6AAAAABI6YSUWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGMZDENBQHA. You are receiving this because you authored the thread.Message ID: @.***>

rebelinux commented 4 months ago

Monday sounds good to me :)

rebelinux commented 3 months ago

Hello,

Looking at the log it seems that there are many errors related to server down or unable to connect exceptions.

It could be some security mechanism implemented that is denying access or that the script is connecting to a DC that is not available.

Anyway, the script uses native commands from the Active Directory powershell module so I think there may be something preventing the connection.

I have encountered this type of situation before with highly restricted environments.

I hope this can help you identify the issue.