Execute PowerShell script w/AD Module using ADF

PS 376 Reputation points
2022-12-04T23:56:35.56+00:00

Hi All,

I am looking for some suggestions on the following scenario.

I have a PS1 script which updates AD every hour with the latest data from an excel spread sheet for all the employees. I would like to move this PS1 script to one of the storage accounts and run it using ADF. Is that possible or Is there any better approach using Az Functions(if this is a option, pls point me to some samples) ?

Objective : Move the on-prem process to Azure.

TIA.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,261 questions
Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,189 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,421 Reputation points
    2022-12-06T05:59:32.503+00:00

    Hi @PS ,

    Thanks for reaching out to Q&A forum.

    If you are looking to move the existing powershell script to Azure and there is no dependency on Azure Data Factory, then Azure powershell functions would be ideal choice. Please note that, Azure powershell functions support PowerShell core versions ( v 6.0 and above) so you might want to make sure your script runs on powershell core and then deploy to Azure functions.

    Azure functions have the capability to connect to on-prem resources by using Hybrid connection manager. Since you are running the script on a hourly basis, you can create a timer trigger function that would be triggered every hour.

    https://learn.microsoft.com/en-us/azure/app-service/networking-features#hybrid-connections

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-hybrid-powershell

    Hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. PS 376 Reputation points
    2022-12-07T03:05:03.02+00:00

    Thank you @MughundhanRaveendran-MSFT !! Will explore Az Powershell functions.

    0 comments No comments