I recently completed work on a my first compiled binary PowerShell module– these are modules built with C#/.Net code instead of PowerShell code. A few module development basics like project setup, handling help files, and writing unit tests did take some work to figure out. In this article I provide some tips for how to handle these common scenarios to help you get started on new projects.Continue reading
Windows PowerShell’s execution policy is well known feature that helps prevent users from accidentally running malicious scripts. I hit an interesting situation recently where Get-ExecutionPolicy showed that I was allowed to run scripts, but in practice I still couldn’t execute scripts from a .NET application’s hosted runspace. What was the problem? The execution policy settings differed across x64 and x86 processes. Since this problem isn’t covered in the official documentation I figured it deserved a quick write-up.Continue reading
If you’ve ever run a database package (.dacpac) publish against a SQL Server or Azure SQL database, chances are good that you have run into the following error when changing the schema for a table that contains data:
SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur.
Azure Resource Manager (ARM) templates have a nice set of built-in functions that allow you to develop complex expressions. These expressions can help a static deployment template file become more scalable and flexible for different scenarios. This article is a quick rundown on my new favorite tip for debugging a template expression that you just can’t get working.Continue reading
Normally we use SDKs to interact with Azure. Things like the Azure .NET SDK, the Azure PowerShell module, or the dozens of other SDKs listed here can be used. These SDKs provide a lot of helpful utilities and validation, but ultimately they will hit the Azure REST API once they need to phone home. Azure’s REST API provides this all-important foundation to write code against the platform.
Today we are going to walk through a helpful modification to the Visual Studio Team Services (VSTS) process and style templates; with the goal of making it easier to find and visualize blocked work.
Note: This post was written right before VSTS re-branded as Azure DevOps. The instructions should still apply for Azure DevOps sprint boards.
Situation: you have written a PowerShell script that runs fine when you launch it from PowerShell directly, but fails to start or run when you try to plug it into a schedule task.