lazywinadmin / Monitor-ADGroupMembership

PowerShell script to monitor Active Directory groups and send an email when someone is changing the membership
MIT License
264 stars 61 forks source link

Support for emailing via Office365 #43

Closed KingRob-GH closed 5 years ago

KingRob-GH commented 5 years ago

Is it possible to send the email via Office365 (ie smtp.office365.com)?

JaimeStill commented 5 years ago

I've created a revised version of the script that makes use of Send-MailMessage as opposed to using the SmptClient object for managing the mail transactions. As we found yesterday, it works with Office365. Leaving here in case @lazywinadmin might be interested: Revised Monitor-ADGroupMembership

lazywinadmin commented 5 years ago

Thanks @JaimeStill Could you do a Pull request to update the code of the script ? (just to give you credit and show your name in contributors) We could either support both approaches or mark it as a breaking change in the changelog. Let me know, else I can implement it sometimes this week.

JaimeStill commented 5 years ago

@lazywinadmin PR submitted

lazywinadmin commented 5 years ago

This was implemented in the last version. Thanks to @JaimeStill ! :+1: