First off credit goes to Boe Prox for his ServerInventory script which is located here https://github.com/proxb/ServerInventoryReport
If you want more information on the script itself that is located here https://learn-powershell.net/2017/02/27/powershell-server-inventory-part-1-sql-database-build/
The script works perfectly fine except its not pulling in the domain controllers. When I dot source the gathering script and do a get-server -domaincontroller it gets them fine as well but for some reason they are not being added to the database. Has anyone figured this out and if so could you point me in the direction I am missing? I guess I should also mention that I have the correct permissions and everything for the database and I am also a domain admin.
In part 2 of the second URL that i posted he references this “There is a variable called $ServerGroup which is keeping a value of ‘MemberServer’. You can disregard this (keep it uncommented though) as I have my lab set up differently where Domain Admins do not have access to anything other than domain controllers which require a second script to be used to query the domain controllers and then write the data to the SQL server (which does allow domain admins to access for the purpose of writing the data to SQL).” Maybe I am missing the second script he mentions?
Thank you for any help.