Hi everyone,<\/p>\n
I am fairly new to Powershell and I have been asked by my company to create a script that emails managers every 90 days to make sure that their employees are still working for the company. So basically a script for Access rectification as we have had some issues with communication of when someone leaves.<\/p>\n
As mentioned I am new to Powershell and know some basic AD scripts however I just don’t have the experience to know where to start!<\/p>\n
I have found the following posts that are similar to my situation but not identical:- Reddit - Dive into anything<\/a><\/p>\n https://www.reddit.com/r/PowerShell/comments/kah4v6/powershell_script_to_email_the_manager_of_an/<\/a><\/p>","upvoteCount":5,"answerCount":4,"datePublished":"2022-08-04T12:15:02.000Z","author":{"@type":"Person","name":"itguyyyyy","url":"https://community.spiceworks.com/u/itguyyyyy"},"suggestedAnswer":[{"@type":"Answer","text":" Hi everyone,<\/p>\n I am fairly new to Powershell and I have been asked by my company to create a script that emails managers every 90 days to make sure that their employees are still working for the company. So basically a script for Access rectification as we have had some issues with communication of when someone leaves.<\/p>\n As mentioned I am new to Powershell and know some basic AD scripts however I just don’t have the experience to know where to start!<\/p>\n I have found the following posts that are similar to my situation but not identical:- Reddit - Dive into anything<\/a><\/p>\n https://www.reddit.com/r/PowerShell/comments/kah4v6/powershell_script_to_email_the_manager_of_an/<\/a><\/p>","upvoteCount":5,"datePublished":"2022-08-04T12:15:02.000Z","url":"https://community.spiceworks.com/t/access-rectification-script-emailing-managers/932777/1","author":{"@type":"Person","name":"itguyyyyy","url":"https://community.spiceworks.com/u/itguyyyyy"}},{"@type":"Answer","text":" What PowerShell code do you have so far? Seems like you should be able to pull the Direct Reports and email those directly to the manager.<\/p>","upvoteCount":1,"datePublished":"2022-08-04T13:27:46.000Z","url":"https://community.spiceworks.com/t/access-rectification-script-emailing-managers/932777/2","author":{"@type":"Person","name":"tb33t","url":"https://community.spiceworks.com/u/tb33t"}},{"@type":"Answer","text":" I have an example script that’s part of PS2HTMLTable that will get a list of users older than X date (typically 90, but user defined) and then sends an email to each manager with their employees.<\/p>\n Here’s a post regarding PS2HTMLTable<\/a> and a direct link to the example script https://github.com/saidbrandon/PS2HTMLTable/blob/master/PS2HTMLTable/Examples/Get-InactiveADUsers.ps1<\/a><\/p>","upvoteCount":1,"datePublished":"2022-08-04T13:48:05.000Z","url":"https://community.spiceworks.com/t/access-rectification-script-emailing-managers/932777/3","author":{"@type":"Person","name":"saidbrandon","url":"https://community.spiceworks.com/u/saidbrandon"}},{"@type":"Answer","text":"