How to create an alert for expiring AD Users
问题 this is my first try in Powershell and I have to say I have no Idea what I am doing. So I want to create a Script, that when it runs send an E-Mail to an Admin with a list of ADUsers who are going to expire within the next 30 Days. This was my first try to get the Users as an output but it doesn't work and I have no Idea why not. So I can't go on and do the Mail-Send thing. I didn't find anything similar on the internet too. Get-ADUser -Filter 'enabled -eq $true' -SearchBase "CN=Users, DC