Start-Job question

Welcome Forums General PowerShell Q&A Start-Job question

Viewing 2 reply threads
  • Author
    Posts
    • #225585
      Participant
      Topics: 47
      Replies: 98
      Points: 645
      Rank: Major Contributor

      Hi,

      I’m running several scripts on the AD on prem server and also need to execute a script on our Azure ADServer, the last script can only run after the sync interval of 30 min.

      there are in my limited opinion two ways to tackle this

      1 run script 1 and 2 then put a sleep for 1 hour and then continue with the Azure AD part.

      if I go along this path can I run this particular script asjob and does this job needs to be retrieved after 1 hour?
      Or use the output

      and than start the script that runs on Azure AD
      with the last option I noticed that the last sync is done on 05/05/2020 05h19 while my local time is 07h19
      is there a way to continue with the Azure ad script after last sync + minimal 30 min?

      I’m able to get time adjusted so that it matches the time on the server with this

      my question is now how do I substract $h from lastdirsynctime?

       

      • This topic was modified 8 months, 3 weeks ago by acer460527.
    • #225750
      Participant
      Topics: 8
      Replies: 19
      Points: 163
      Helping Hand
      Rank: Participant

      Not sure if that’s really what you are looking for though.

      I haven’t had to do something like this before (scheduling tasks on AzureAD from a local source at a dynamic time), however you might look into Azure Runbooks and Automation. I’d assume it would be possible to kick off a Runbook at a specific time.

    • #225792
      Participant
      Topics: 47
      Replies: 98
      Points: 645
      Rank: Major Contributor

      thanks
      this is what I was looking for

       

       

Viewing 2 reply threads
  • The topic ‘Start-Job question’ is closed to new replies.