split array

Welcome Forums General PowerShell Q&A split array

Viewing 3 reply threads
  • Author
    Posts
    • #236110
      Participant
      Topics: 41
      Replies: 94
      Points: 560
      Rank: Major Contributor

      Hi,
      I use this

      this will give me the clean name without the “CN=” ect

      now I want to send this by mail to a common mailbox but I do get it printed out like groupA groupB groupC

      by preference I would like to print this

      groupA

      groupB

      groupC

      how do I achieve this?

    • #236170
      Participant
      Topics: 13
      Replies: 1752
      Points: 3,132
      Helping Hand
      Rank: Community Hero

      There is an eBook in Free Resources about HTML reporting you should take a look at, but it’s simpler to use HTML for simple formatting in message bodies:

    • #236182
      Participant
      Topics: 6
      Replies: 552
      Points: 2,090
      Helping Hand
      Rank: Community Hero

      Dang, Rob is fast! Here’s another way you can accomplish your goal. We both cleaned up the code with splatting, it’s highly recommended for many reasons.

      https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting?view=powershell-7

    • #236206
      Participant
      Topics: 41
      Replies: 94
      Points: 560
      Rank: Major Contributor

      thanks for your answers

       

      Paul

Viewing 3 reply threads
  • The topic ‘split array’ is closed to new replies.