Needing to read data from Excel and output it into EMS command

37 Views Asked by At

I am currently working on a project to help me with a job at work. Currently we are copying and pasting a command over and over and over and over (1800 times to be exact) into a mail server similar to Power Shell. The command has 2 variables that are manually changed each time it is pasted (a name and email) and they are pulled from an excel doc. Exporting emails using an Exchange Management Shell.

I was originally trying to use Python3 but am now looking more towards PowerShell scripts. I basically need to read column 6 of the excel doc to check if the columns highlighted a certain color, if it is that color I want it to skip over it, and if it is not that color I need to take the data from columns 1 and 3 and concatenate them into an EMS command and then have that run in PowerShell and have it loop a set amount of times. I would copy my code but every time I read a forum post it completely changes so there is quite literally no point. The main issues I am having is actually reading the data from excel and turning the concatenated string into an actual command and not just echoing it into the Shell. There are similar postings to mine but I struggle to follow along as I am very new to PowerShell Scripting.

0

There are 0 best solutions below