-1

I have powershell command which runs on Automation Runbook to add new user in Azure Analysis Database ,now i am trying to execute the same command through Custom Activity of Azure Data factory but not able to execute it. My powershell script is saved in script.ps1 file which is place at storage account and i am using command powershell .\script.ps1 to execute it..Please suggest...

1 Answers1

0

To run a powershell script from ADF, you can use Custom activity in ADFv2. The custom activity can run the powershell script on an Azure Batch pool of virtual machines.

Custom activity doc: https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-dotnet-custom-activity

Also for your reference : How to run PowerShell from Azure Data Factory

Thanks!

AmanGarg-MSFT
  • 1,123
  • 6
  • 10
  • I have below script saved on storage account , and it isadf task showing successful but not giving any output Script --> $Passwd = ConvertTo-SecureString "xxxxx" -AsPlainText -Force $pscredential = New-Object System.Management.Automation.PSCredential('xxx', $passwd) Add-AzureAnalysisServicesAccount -RolloutEnvironment 'westeurope.asazure.windows.net' -ServicePrincipal -Credential $pscredential -TenantId "xxxx" Add-RoleMember -server "xxx" -ServicePrincipal -Credential $AzureCred -TenantId "xxxx" -Database "xxx" -MemberName "xxxx" -RoleName "Developer" – Nusrat Shaikh Jun 21 '19 at 11:06