I'm in the process of automating my new hire account creation in AD possess. I have created my scripts to import a csv file and that all works great. But now I am trying to automate it even further by just copying the contents of the email HR sends me into a txt file then have powershell format each line as a new column then export it to a csv file I can run my other script on (eventually combining them into just 1 script) The email format comes in looking like this.
Username: Test User
Title: Sales
Department: Sales
Manager: Manager's Name
Similar User: CoWorker's Name`
I just want to copy and paste that into notepad and save it. then have powershell import it, format it like it is below and then export it.
Username Title Department Manager Similar User
Test User Sales Sales Manager's Name CoWorker's Name
I have been trying the import-csv and get-content commands but I am having no luck getting it formatted the way I need it. Any one have any suggestions?