Lerch Web Wiki

Random, erratic, no responsibility is taken for the correctness of this information

User Tools

Site Tools



my name is Marcus and I am a Microsoft PFE working in Germany. I provide support for Microsoft customers primarily regarding Identity and Security. I also do PowerShell workshops.

During my work at customer sites I often see administors doing the same manual tasks on a daily basis. That’s where the ideas for most of my PowerShell samples come from.

If you find some of my scripts usefull, feel free to drop me a note. And if you are confronted with boring daily tasks that you like to be automated, tell me what you need and I might have a code sample that helps you.




You may find some of my larger projects on GitHub

Show Password Expiration Date

Short PowerShell sample to calculate the expiration date of a users password. The script evaluates the domain password policy as well als fine grained password policy (if any) and the user account control flag password never expires.

Show Password Expiration Date


To get the installed hotfixes from a server (local or remote) we can use the Get-HotFix cmdlet in Powershell. So all we need to do is compare the output. Depending on the number of hotfixes this can be a pain in the neck if you try to do it manually. And the more servers you need to compare the more pain…

Hot(fix) or not(fix)?

Using PowerShell across Domains and Forests

ever had to do administrative tasks in an environment with more than one Active Directory Domain or even more than one Forest? – PSDrives to the rescue!

Using PowerShell across Domains and Forests


The newest addition to this blog. Small function that tests if all DNS Records your DC needs to function properly are registered correct on your DNS server



Ever needed to find the next closest domain controller that is up and running and accepting the changes you need to apply to an object? Try the little script here…

Locate my DC

start.txt · Last modified: 2017/11/29 08:05 by marcus