Managedby needs

Welcome Forums General PowerShell Q&A Managedby needs

Viewing 1 reply thread
  • Author
    Posts
    • #225405
      Participant
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member

      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

    • #225519
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      Helping Hand
      Rank: Community MVP

      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.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.