Very Slow PS script execution time to Azure AD

Welcome Forums General PowerShell Q&A Very Slow PS script execution time to Azure AD

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

      Hello folks, Hope everyone is staying safe during the pandemic.

      We have a large tenant with couple thousand users and about a thousand groups. We’re trying to create some 200 new groups and adding 125 existing users to these new groups via PowerShell script. The script was tested in a Azure AD Dev environment and it works flawlessly. Running the same script in our production tenant, creating new Groups is quick, but adding users to this group takes a very long time, atleast good minute per user, is this normal or how can I decrease my execution time. I’m running WMF 5.1 on a Win10 with latest Azure and PowerShell modules.

       

      If user assignment code is needed, let me know and I can post it.

      Any help with this is really appreciated. Thanks

       

    • #270185
      Participant
      Topics: 16
      Replies: 1855
      Points: 3,568
      Helping Hand
      Rank: Community Hero

      It will difficult to assist you without having some code to review. Adding a user to a group taking a minute does sound excessive. Would recommend posting code to review to see what you doing.

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