Start-Job with Azure resources

Welcome Forums General PowerShell Q&A Start-Job with Azure resources

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 9 months ago.

  • Author
  • #70999

    Points: 0
    Rank: Member


    Did anyone has a chance to work with PShell background jobs with Azure resources?

    I am trying to initiate custom script extension on the VMs with Start-Job function. It doesnt give me error message, but it finishes in few seconds. If I do without start-job, everything is running fine.

    The code line I am having problem:
    Start-Job -ScriptBlock {RemoveCustomExt $VM.Name $Resource $VM.Location} -Name $VM.Name

    RemoveCustomExt is a function and Start-Job is in ForEach loop.

    Any help is much appreciated.


  • #71170

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Jobs runs under, essentially, a new PowerShell thread. I wonder if it's having some problems with context – perhaps authentication, perhaps actually finding the function?

The topic ‘Start-Job with Azure resources’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort