Thank you in advance for checking out my question. I have only been scripting for the past couple of months, so I will apologize in advance if my terminology is not on point.
Trying to simplify our new user addition process in our company and automate a lot of manual tasks. We have Office 365, so all employees end up in exchange online.
Essentially my script imports a single csv of new employees. I have $variables that are based on if they are added to the AD, MSOL, and Job Titles/Department.
I currently log if there are any errors to adding an employee, but I am trying to figure out the best method for writing content to a file if the employee was added correctly. I would need the file to include their Display Name, Email Address, Job Title, Department, Location, and when they were created.
What would be the best method to do this. I have been searching online, but could not figure out a way.
Currently, I have been getting a list of newly created employees by getting employees created in the last 30 minutes off of O365, but I find it is pulling too much data. I think that could be because I 0365 reports with UTC time and my local time is Eastern.
Any idea or help would be great, thank you!