Add Azure Antimalware Extension to a VM Scale Set

If you’re running a Windows Server 2016 base image, ignore this post because we’ve built Windows Defender in. However, if you’re running Server 2012R2, for example, and wish to apply the Microsoft Antimalware Extension to an existing VM Scale Set, here is a PowerShell script to do it: # Add the Microsoft Antimalware Extension to…

0

How Do I Open Ports with PowerShell?

If you have a history with Windows, you’re probably used to using netsh to open ports on the Windows Firewall. We have a whole slew of PowerShell cmdlets to administer the Windows Firewall now and I wondered how to use PowerShell to open ports. It took me longer than it should have to do it,…

0

How to Use PowerShell DSC to Prepare a Data Drive on an Azure VM

Introduction I was asked how to automate formatting a data drive on an Azure VM. The drive had been provisioned already when the infrastructure was created via ARM script, however the disk was raw. I developed this solution with Azure PowerShell Desired State Configuration (DSC), Azure PowerShell 1.0 (newest release as of April 2016), and…

0

How to Convert a VMWare VMDK to Hyper-V VHD

A customer, who is a VMWare shop, gave me a VMDK file of one of their VMs for development purposes. I don’t have VMWare, but I do have Hyper-V on my dev boxes, so I needed to convert the VMDK virtual disk to a format I could connect to a Hyper-V VM. Microsoft offers a…

25

Script to Perform Azure SQL Premium Failover

** I believe this post is now out of date due to some recent work by the product team, though I have not had the time to try their work yet. Please see this article, it looks to me like there is now a single cmdlet to failover now. My post below was a year before…

2

How to Script Disabling CRL Checking With Netsh and Powershell

I ran into a situation where I needed to automate disabling the certificate revocation list (CRL) checking for a certificate. I won’t go into all the details, except to say that the trust chain provider URL was not available to the server with the certificate, so this had to be done as a temporary fix…

1

IIS SSL: How To Powershell Script Client Cert Required

I recently was asked how to script the IIS SSL setting to require client certificates (see figure below) using Powershell.  We needed to automate the setting since it was part of an Azure deployment.  There are other methods of doing this, but since we were using Powershell for everything else, we preferred to keep a…

3

Help! I Lost a Disk From My Storage Spaces Mirror, How Do I Recover?

I love Server 2012 Storage Spaces because it provides me the opportunity to consolidate a bunch of separate drives into one big contiguous space.  One of the options on storage spaces is mirroring, which I used to create a storage pool using two 1TB drives.  My goal in doing this was to leverage better read performance…

4

Error: Proxy Authentication Required When Installing Azure PowerShell Cmdlets

Problem Background Recently I ran into an installation error with a customer attempting to install the Windows Azure PowerShell Cmdlets. These cmdlets are a CodePlex project that add a tremendous amount of functionality to PowerShell for managing Windows Azure. For more information, see the project homepage: http://wappowershell.codeplex.com/. Note: This is a CodePlex project, not a…

0