Showing all posts tagged: 'PowerShell'

A 15-post collection

Automate login for Azure Powershell scripts with Service Principals

Automation is great. It's the bedrock of any successful IT department and the default solution for any task that has to be repeated more than once. I'm a big proponent of automation and, since I spend most of my time in Azure, I try to automate as many tasks as I can. Today, I'll explain how to automate your Azure login in order to allow your scripts to run without any supervision. Disclaimer: many of these tasks should be running using the Azure Automation service because of better integration and smoother on boarding. There's a ton of ready-made RunBooks in …[read more]

Configure a RunOnce task on Windows

Today was one of these days. Faced with a new problem I've never come across before. I was trying to configure a task to run once and only once on the server was provisioned for the first time. Something like a bootstrap script. In my quest to solve that problem, I came across a thing called Run and RunOnce registry keys! What are Run(Once) registry keys? Who knew that these things even existed, but here we are. So what do these keys really do? Let's grab the definition from the official documentation on MSDN Run and RunOnce registry keys …[read more]

PowerShell for the Gui People or FTGP

Yes seriously, that's the title of this post. And I'll explain why. Many of us use PowerShell (PoSH) for automation. If you are working on Windows and you don't use PoSH for automating and scripting basic tasks then you're missing out big. PoSH, which started as one of the first Open Source projects in Microsoft, is deeply ingrained into Windows. Both on the server and the client. It's a beautiful and powerful scripting language that allows you to not only manage you Windows OS but services such as BizTalk, SQL Server, IIS etc. The list is big. Microsoft Azure also …[read more]

The new Azure Powershell Resource Manager - 1.0 Preview

The new Azure PowerShell preview module is out. I use PowerShell on Azure to automate many tasks and it's something that we use in the team quite frequently. Yes, you can use the Azure Portal (website) to accomplish the same tasks but I like using PowerShell for a few reasons: Create repeatable and consistent tasks Share the files and knowledge that comes with it Automate all the things! This preview release is the first major version taking it to 1.0. Unfortunately, it brings some breaking changes with it. For this reason, it's imperative that you read the documentation before …[read more]

Generate Guids with PowerShell or ScriptCs

There are many ways to generate GUIDs. You can use one of the many free websites or you can write your own (quick) script to do it. If you want to create your own script, there are 3 easy approaches: PowerShell ScriptCs Uuidgen.exe The first two are very powerful and versatile and can do a lot more than just generating GUIDs. The 3rd one is a dedicated utility for generating GUIDs only. PowerShell PowerShell is first as it's the easiest of the 2. Easiest to get started, that is. PowerShell is already installed on your Windows machine. Just bring …[read more]