Trying to use a variable inside of a variable… failing at it.

Welcome Forums General PowerShell Q&A Trying to use a variable inside of a variable… failing at it.

Viewing 1 reply thread
  • Author
    • #266297
      Topics: 10
      Replies: 12
      Points: 161
      Rank: Participant

      Hello Everyone,
      I’m crating a little script to always true up 3 users Blocked Senders Lists so that they are always the same. The intent of the script is to look at all three users, see who has the largest Blocked Senders List, and apply that list to the other two users. After it has been applied, check again to see if all the numbers match.

      The issue I run into is when I try to use the variable that is “Biggest_Entry_Count”. It has variable of the largest variable inside, but when I use that to apply the entries to the other users, it fails.

      Here is the code that I have written so far:

      Here is the output I currently get:

      Thanks for any help you can provide!
      – Rob

    • #266306
      Topics: 17
      Replies: 1869
      Points: 3,631
      Helping Hand
      Rank: Community Hero

      Here is an different approach to try:

      Do not have access to Exchange to test or see what is returned from the GET, but you just need to filter on the appropriate property and to perform the SET

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