Welcome › Forums › General PowerShell Q&A › Managedby needs
- This topic has 1 reply, 2 voices, and was last updated 8 months, 3 weeks ago by
Participant.
-
AuthorPosts
-
-
May 4, 2020 at 7:14 pm #225405
I need to get who the AD group is managed by, then I need to automate an email to that user or group with the member names of the AD group with general text like ‘Please review” so they can review the AD group to ensure everyone in it is supposed to be in it.
I have a script that gets the managedby who,
get-adgroup -filter * -properties Name, Description, Managedby | Select Name, Description, Managedby | export-csv c:\temp\managedby-groups-$(get-date -f yyyy-MM-dd).csv
please help and thanks
-
May 5, 2020 at 1:07 am #225519
Jeremy, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.
When you post code or error messages or sample data or console output format it as code, please.
In the “Text” view you can use the code tags “PRE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
Thanks in advance.Have you tried to search for it? There are literally thousand of examples for tasks like this even here on this forum or on the PowershellGallery for example.
You would need to get the email of the “managedby” account and a loop and the cmdlet Send-Mailmessage.
-
-
AuthorPosts
- The topic ‘Managedby needs’ is closed to new replies.