I have a really hard script that I need desperate help on. If anyone can help so that I can schedule to run over night, every night? PS my scripting knowledge is as good as a hamster.
I need help creating a powershell script and or VB scripts for Exchange online to automatically add contacts and add them to a mail enabled group (not public folder or tradition distribution list).
convert a xlsx file in to a csv files (this xlsx file is created every night probably with a different file name every night). The cloumns in the cvs will be first name , last name, ExternalEmailAddress, OrganizationUnit. I will probably have a batch file run to delete any other excel or csv files in this folder before the new xlsx file is created
To be able to run a scheduled powershell to automatically connect to exchange online without any interaction
I got as far as this but it keeps prompting for username and password:
Set-ExecutionPolicy RemoteSigned -Scope Currentuser
$credential = get-credential
Connect-MsolService -Credential $credential
$ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/
" -Credential $credential -Authentication "Basic" -AllowRedirection
Delete all of my contacts in exchange on line
Using the converted CSV file automatically import contacts to a exchange group (first name , Last name and email address only).
If the exchange group does not exist then create a group with the email address (firstname.lastname@example.org)
All of the above will be a scheduled task from the on premises application server.
My bespoke management system is constantly being updated on a daily basis with clients constantly being added and removed from distribution lists. This is becoming a nightmare to administer so I thought that if I could get my management system to export a report and then use that report to carry out the admin at night time it would save me hours of work each week.
I know its a hard one but I'm sure one or more of you have the knowledge(fingers crossed)