• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Passwords

One-Liner Wednesday November 2, 2022

November 2, 2022 by admin Leave a Comment

Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" |
Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}} | sort-object ExpiryDate

Here is a one liner that find very useful and hope you do to.

You can customize it even more, but for now this one grabs all the AD User accounts that are expiring and the ones expiring first at the top. I love using this to stay in front of users passwords expiring then they can’t connect or if they are off network and is a rush to get it done.

You could even sent this up as a scheduled task and have it pull the next 2 weeks of users. Then either you reach out to them, it emails them, or it notifies your help desk to reach out to them to help change their password.

Or you could have it in your dashboard so you’d always see the next 2 weeks of users passwords expiring.

Tagged With: AD, One Liner Wednesday, Passwords, PowerShell, Windows Server

Module Monday October 10, 2022

October 10, 2022 by ClaytonT Leave a Comment

It’s time for Module Monday….

Share Code not Secrets, I think says it best.  I guess you probably want the name of the module now…It’s called PSSecretScanner which will search files/folders that you point it too and check if there are any passwords visible! Maybe you have some old code that you haven’t used in awhile, you might want to run this on it just to make sure younger you who may have been more naïve didn’t leave any plain text passwords! We’ve all been there!

PowerShell Gallery:
PSSecretScanner/1.0.9

Tagged With: Module Monday, Passwords, PowerShell, Reporting

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • One-Liner Wednesday January 25, 2023
  • Module Monday January 23, 2023
  • One-Liner Wednesday January 18, 2023
  • Module Monday January 16, 2023
  • Read-Only Friday January 13, 2023

Categories

  • 365
  • Active Directory
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent