Function not working

Welcome Forums General PowerShell Q&A Function not working

Viewing 1 reply thread
  • Author
    Posts
    • #237472
      Participant
      Topics: 9
      Replies: 21
      Points: 140
      Rank: Participant

      Hi everyone,

      I’m working on a function that assigns an Intune license to anyone within an Azure AD group that also has an E3 license. I enter my group parameter and thought I never get an error message, the licenses do not get applied either. Any assistance is greatly appreciated. Here is what I have. Thank you -Nelson

    • #237583
      Participant
      Topics: 13
      Replies: 1753
      Points: 3,136
      Helping Hand
      Rank: Community Hero

      The logic needs some work. What exactly are you passing as $Group? It appears to be an group object and could be an array of items as you are looping and looking at a property of the group. If you are passing the group to the function, then why are you manually defining groups in the function? Normally, you would pass a name or objectId to the function and lookup the group based on the passed information rather than statically defining groups.

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