title: How PowerShell Login-AzureRmAccount in Azure using Function Apps
body: <p>Related to this tutorial (<a href="https://blogs.msdn.microsoft.com/powershell/2017/02/24/using-powershell-modules-in-azure-functions/" rel="nofollow noreferrer">Using PowerShell Modules in Azure Functions</a>) I can run PowerShell in my Function Apps. right now I want to run this PowerShell tutorial from microsoft (<a href="https://docs.microsoft.com/en-us/azure/data-factory/v1/data-factory-build-your-first-pipeline-using-powershell" rel="nofollow noreferrer">Build your first Azure data factory using Azure PowerShell</a>). In first step I should run this PowerShell codes:</p>
  
  <pre><code>PowerShell Login-AzureRmAccount
  PowerShell Get-AzureRmSubscription
  #Run the following command to select the subscription that you want to work with. This subscription should be the same as the one you used in the Azure portal. 
  PowerShell Get-AzureRmSubscription -SubscriptionName &lt;SUBSCRIPTION NAME&gt; | Set-AzureRmContext
  </code></pre>
  
  <p>problem is that this tutorial is for using PowerShell in Local machine (using PoserShell from Windows), but I need to run this tutorial using <strong>Function Apps</strong>, then I need to change the scenarios...
  <br/>
  can you please guide me how I should change or use <code>Login-AzureRmAccount</code> and <code>Get-AzureRmSubscription</code>?</p>