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

Major update #52

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

Michaelawilliams28
Copy link

@Michaelawilliams28 Michaelawilliams28 commented May 23, 2020

I organized the script into functions. Makes it easier to debug and create a progress bar.

Line 719 was failing for me. you can see the changes I made instead of .count did DistinguishedName.count

Fixes #47 was because of empty variables causes the html module to fail and script to stop running. I moved all the if statements checks to its own function. making sure the empty vars are caught and prevents the script from failing.

Fixes #46 last logon time fixed

line 272 was failing for me as well. a qoute before the name param.

I added a write to log to make it easier to debug in the future. can simply add a to log function anywhere we want to check functionality.

instead of checking count for empty tables I added a null check. we can use an "-or" statement if you want to keep the count check.

Fixes #14 added a progress bar.

Fixes #49 added computer last login

added a small wait timer between functions

added a function to create a report folder and place the report into that folder

I commented 3 vars near get-users "counts" because they were not being used.

I also gave unique names to the same name variables for psobjects. I was worried if the previous var had a value and the next did not. then the output of report may be wrong.

please test my branch https://github.com/Michaelawilliams28/PSHTML-AD-Report and let me know what you think.

@mscbeheerscripts
Copy link

When i test this script i mis some informatie in the report. UPN information is missiong and User last logon is empty. If i run the old version of the script, than the information is there.

@Michaelawilliams28
Copy link
Author

Michaelawilliams28 commented Jun 16, 2020

When i test this script i mis some informatie in the report. UPN information is missiong and User last logon is empty. If i run the old version of the script, than the information is there.

Is it all users? or just some. Are they Local Accounts? or Domain Accounts.
Which Version of Windows Server are you using?
Which Version of PowerShell are you using?

The Test environment was Server 2019. Single Domain not Forest and a few default local accounts and dozen or so domain accounts.

I would have to duplicate it. Then, I can probably create trigger to run the old syntax.

I tested it again and seems to be working for me and my friend.

@mscbeheerscripts
Copy link

I have given the wrong information too you. I don's see upn settings and more than 30 not logged on.

This are screenshot from bwya77 version script

Screen Shot 06-18-20 at 09 22 AM
Screen Shot 06-18-20 at 09 23 AM

And this form your version with missing information.

Screen Shot 06-18-20 at 09 26 AM 001
Screen Shot 06-18-20 at 09 26 AM

Server std 2016 with powershell 5.1
Al missing are domain users

@joostvanmeurs
Copy link

joostvanmeurs commented Nov 10, 2020

Any updates on this? I'm using this version, but still the same issues already mentioned above. Additional issue, cannot sort on column LastLogon in a correct way.

Fixed Domain Suffix issue
@Michaelawilliams28
Copy link
Author

Michaelawilliams28 commented Nov 23, 2020

finally got around to debugging and fixing suffix issue.

Try this and see if it works, Its hard for me to duplicate users that have not logged in "in 30 days". I guess I could edit some AD attributes. l either way let me know
@Michaelawilliams28
Copy link
Author

Michaelawilliams28 commented Nov 23, 2020

okay, updated the user have not logged in 30days. Let me know how its goes.

  • sorry about the delay. I got busy and had to delete my sandbox env.

@joostvanmeurs
Copy link

joostvanmeurs commented Nov 25, 2020

I think the "user have not logged in 30days" and "suffix issue" issue is solved now thank you!

I have some additional comments:

Dashboard tab:

(The following table is sorted on "Name", is it possible to sort it on "When Changed" by default? Because I have a lot of numeric (hidden) records apparently, the output is not very nice.

image

Same for this table. Default sorting on "Days Until Password Expires" recommended. And why is this table displaying a lot of users, instead of users within the 7 days value?

image

Groups tab:

I'm missing a lot of groups in the categorized overview (2774, 1, 1, 33). Sum 2774-1-1-33= 2739. So, where are the other groups? Table underneath shows me entries with an empty value in the Type column. I think I am missing the Type "security group".

image

Users tab:

First, same sorting recommendation for "When Changed and "Days Until Password Expires".

Expiring Accounts (Users "0") vs Accounts Expiring Soon (Dashboard "1") - Different

image

Computers tab:

I need to filter some Operating Systems. And not every Operating System in de table underneath is displayed in the categorized overview, for example, "Windows Server® 2008 Standard".

image

I also receive the following error when running the script (It won't stop the script):

image

It is possible to fix these "issues"?

Thank you for your time!

@trlhrn
Copy link

trlhrn commented Jan 5, 2021

Hi there. Awesome script. We need to get a report only about groups and their members. I've tried to edit your script to leave code only for groups and received an empty HTML file. Could you, please, advise how I can fix it?

@Steveo0906
Copy link

Hi Michael - I have added to your great work and have the code - Maybe I can upload to you to add this in

  • Added DFL and FFL to main Dashboard and new AD Health page (DCDIAG, Replication, SysvolDBSize, AD Connect)
  • Have added AAD Sync Health Check - Let me know

@Steveo0906
Copy link

Steveo0906 commented Oct 25, 2022

@Michaelawilliams28
#I have uploaded to the following location for review - steveo0906 patch-1:
See Code attached
PSHTML-ADVM-Report.zip

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