Skip to content
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

Memory consumption when running Get-ADDBAccount command #171

Open
omachugh opened this issue Dec 7, 2023 · 1 comment
Open

Memory consumption when running Get-ADDBAccount command #171

omachugh opened this issue Dec 7, 2023 · 1 comment

Comments

@omachugh
Copy link

omachugh commented Dec 7, 2023

Hi

Using DSInternals PS Module version 4.9, seeing excessive memory consumption when running the following PS command

Get-ADDBAccount -All -DBPath $NTDSPATH -BootKey $key

To get halfway through c100k accounts is consuming about 6GB of memory.

Thx

@MichaelGrafnetter
Copy link
Owner

Hello @omachugh, are you saving the output of Get-ADDBAccount to a variable, or are you only processing the results through the pipeline? How large is your ntds.dit file?
In environments with Credential Roaming and/or Windows Hello for Business, objects consuming 10s or 100s of KBs are quite common. And deserializing the data from DB into .NET objects also takes its toll. In my performace tests, the .NET garbage collector seemed to do its job during pipeline processing and I have not spotted any memory leaks in the interop libraries from Microsoft.
I am working on a feature where you could select what account attributes to fetch. That should increase the performance on large AD databases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants