I need a powershell script that will help alert users thats their PC is about to fall off the domain. Our domain policy is set to 90 days. If the machine is not connected to the network for 90 consecutive days it will lose domain trust (get kicked off the domain).
So I need a script to look for machines that have not connected for 80-89 days and are about to expire / fall off the domain soon, and send a email to the user informing them that their device is about to fall off the domain and advise them to connect to the network
I have a CSV file that has two columns (Computers Names and Email Addresses).
The script should look through the CSV and check how long each computer has been off the network. If the script finds that its been 80-89 days then it should send an email to the user of that PC to alert them.
I did a little research on this and found that we should be looking for the computers "PasswordLastSet" date.
Hi
I can provide PowerShell script to alerts users through email if machines are about to fall off the domain.
I can also incorporate the logic to email users manager if the system has been off-network more than 85 days (provided Manager attribute is populated in AD for the corresponding email address in CSV.)
We can discuss details in chat
I have 5 years of working experience in .NET development. During these years, i have made several desktop applications using Windows Froms and Windows Presentation Foundation.
I have gone through the details. What i propose ti deliver.
A Windows console application which will look through the csv for computer not on for more than 80-89. If it is within 80-89 it will notify the user about account delete via mail.
You can add the application in windows scheduler to execute it auto.
Lets discuss in chat.