Jan Egil Ring works as a Senior Consultant on the Infrastructure Team at Crayon, Norway. We are really fortunate today to have a great blog post by Microsoft Windows PowerShell MVP, Jan Egil Ring. Microsoft Scripting Guy, Ed Wilson, is here. Write-Verbose -Message 'Connecting to Azure.Summary: In this guest blog article written by Microsoft MVP, Jan Egil Ring, you will learn how to use Exchange Web Services (EWS) with Windows PowerShell. Please install MSDeploy or specify the path to MSDeploy.exe on this system. Throw "MSDeploy.exe not found at ' $MSDeployPath'. If ( -not ( Test-Path -Path $MSDeployPath)) $MSDeployPath = " $ env:ProgramFiles\IIS\Microsoft Web Deploy V3\msdeploy.exe " So, I’ll start by just pasting the function that does performs the task: There is no requirement to use PowerShell PSake – just a simple PowerShell script will do. ![]() The continuous delivery pipeline was also able to call the exact same task to perform the deployment. Note: in my case our teams put all deployment code into a PowerShell PSake task in the application source code repository to make it trivial for anyone to run the deployment. This will work with and without Web App deployment slots. The purpose of this post is to share the PowerShell function/code and process I used to do this. So, to work around this limitation I determined I had to use Web Deploy/MSDeploy. The newer Azure Resource Manager cmdlets (*-AzureRM*) all support a login using a service principal, but the problem is that there is no Publish-AzureRMWebsiteProject cmdlet. Therefore using Publish-AzureWebsiteProject would only work if a development team member was able to interactively login– which would prevent the same process being used for automation or our continuous delivery pipeline. Only service principal accounts can be authenticated using automation. This cmdlet looks like it should do the trick, but it isn’t suitable because it requires authentication by a user account instead of a service principal. If you look through the Azure PowerShell cmdlets you’ll find a service manager one called Publish-AzureWebsiteProject. So I decided to go and find out how to deploy an Azure Web App using PowerShell using an Service Principal. This ensures that whatever deployment process is used, it is the same no matter who or what runs it – and we end up continuously testing the deployment code and process. I’m a big believer that all code (including deployment code) should be in the application source repository so it can be run by any tool or release pipeline – including manually by development teams. The problem with many of these tools and process is that they do a whole lot of magic under the hood which makes the process difficult to manage in source control. If I were to list the methods and tools I’d still be typing next week. Sadasd on List Global Assembly Cache usi…ĭeploying an Azure Web App is almost stupidly simple. Windows 10 Mail… on How to fix “Your account…ĭaniel Scott-Raynsfo… on List Global Assembly Cache usi… Mounika on Azure Resource Manager Templat… Enable AKS Azure Active Directory integration with a Managed Identity from an ARM template. ![]() ![]() Automate on-boarding Azure Log Analytics Container Monitoring of any Linux Docker Host using Azure Arc.12 Things you Should Know when Implementing Azure DevOps in your Organization.AKS Announcements Roll-up from Microsoft Ignite 2020.Protect your Environment from Malicious Pipeline Changes in Azure DevOps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |