reset counter

Welcome Forums General PowerShell Q&A reset counter

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

      Hi,

      with the code below I’m checking the difference between the last Sync Time between on premises AD management server and AzureAD.
      this is working just fine as long as you don’t execute the script somewhere between the 27th and 30 min after the last sync then it will result in an error and you have to wait till the next cycle in order to continue

      what would be the easiest way to reset the counter or relaunch this script when started in the above mentioned time frame after last sync

       

      thanks for your Idea’s

      Paul

    • #245268
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP

      … this is working just fine as long as you don’t execute the script somewhere between the 27th and 30 min after the last sync then it will result in an error …..

      I’d recommend analyzing and correcting the error instead of working around. 😉

    • #245484
      Participant
      Topics: 0
      Replies: 37
      Points: 373
      Helping Hand
      Rank: Contributor

      Hello Paul,

      I agree with Olaf workarounding error is not the solution.

      Would you be so kind to provide more details from the business side? I am assuming this is part of the onboarding process. Why you need to wait? What is happening during the wait, another script?

      With more details it will be easier to suggest some ideas and improvements.

       

      Thank you.

       

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

      thanks Andy for your reaction,

      the waiting period is nothing more then waiting till the sync is done between on premises AD and AzureAD because I can only continue when the account of this given user is disabled.

      I think that from time to time the Sync is slower then the script itself which will result in the fact that the account is not updated in AzureAD in time.

      hope this helps

Viewing 3 reply threads
  • You must be logged in to reply to this topic.