Error: ‘User failed validation to purchase resources’ when deploying a virtual machine

Today I’ve deployed a new virtual machine within Azure using the Windows Server 2022 Azure Edition Preview Marketplace image. After running my Powershell script, I received an error:
’User failed validation to purchase resources. Error message: ‘You have not accepted the legal terms on this subscription: …..’

image

So, let’s take a look at the legal terms, also using Powershell. I’ve used a couple of variables.

$azureVmPublisherName = "MicrosoftWindowsServer"
$azureVmOffer = "microsoftserveroperatingsystems-previews"
$azureVmSkus = "windows-server-2022-azure-edition-preview"
$Version = "latest"


Get-AzMarketplaceTerms -Publisher $azureVmPublisherName -Product $azureVmOffer -Name $azureVmSkus

image

As you can see, the legal terms are not accepted yet!! With a small Powershell command, we can accept the legal terms.

Get-AzMarketplaceTerms -Publisher $azureVmPublisherName -Product $azureVmOffer -Name $azureVmSkus | Set-AzMarketplaceTerms -Accept

image

Now you’re good to go!!

Use Azure Bastion to access your virtual machine in Azure

As most of you know, it’s possible to provide a virtual machine in Azure with a public IP address. This IP address can then be used to build a connection to, for example, RDP or SSH.

This way of connecting takes place over the Internet, which entails a great security risk. In many environments we see jumpbox or stepping stone servers, which are placed in the DMZ. These servers can be accessed from the Internet, and from these servers a connection can be made to a server or multiple servers on the internal network.

Such an arrangement is not safe, unmanageable and vulnerable. Azure Bastion is a great addition to facilitate a secure connection to a virtual machine in Azure. Azure Bastion integrates into the Azure portal, requiring multi-factor authentication. The virtual machines do not need to have a public IP address, so they are not accessible directly from the Internet.

Azure Bastion is a fully managed, autoscaling and hardened PaaS service, to provide you secure RDP and SSH connectivity. Het is eenvoudig te configureren in slechts een aantal stappen. Door gebruik te maken van virtueel netwerk peering, is het mogelijk om Azure Bastion eenvoudig toe te voegen aan een bestaande configuratie in Azure.

image

  1. Configure a new virtual network for Azure Bastion
  2. Create a new subnet named ‘AzureBastionSubnet’ required for Azure Bastion
  3. Configure virtual network peering to your other networks
  4. Create an Azure Bastion host
  5. Login in the VM through the Azure portal using Azure Bastion
  6. See the list of active sessions in the Azure Bastion Host properties

2021-05-20_16h00_34    2021-05-20_16h00_532021-05-20_16h00_59    2021-05-20_16h01_102021-05-20_16h01_45    2021-05-20_16h11_542021-05-20_16h12_54    2021-05-20_16h15_14

Now you can securely connect through Azure Bastion to a virtual machine running RDP or SSH. As you can see, the virtual machine I’m connecting to has no public IP address, only a internal IP address.

image

PowerCLI: An Aspiring Automator’s Guide

Getting into scripting can be daunting. It’s easier to just use existing scripts found online, but if you choose this route you’ll quickly run into limitations. If you take the time to learn how to create your scripts, trust me, you’ll never look back!

clip_image002

Automating vSphere is particularly useful for countless applications and the best way is through PowerCLI – a version of PowerShell developed specifically for VMware. Learn how to develop your own PowerCLI scripts with this free 100+ page eBook from Altaro, PowerCLI: The Aspiring Automator’s Guide.

Written by VMware vExpert Xavier Avrillier, this eBook presents a use-case approach to learning how to automate tasks in vSphere environments using PowerCLI. We start by covering the basics of installation, set up, and an overview of PowerCLI terms. From there we move into scripting logic and script building with step-by-step instructions of truly useful custom scripts, including how to retrieve data on vSphere objects; display VM performance metrics; how to build HTML reports and schedule them; the basics on building functions; and more!

Stop looking at scripts online in envy because you wish you could build your own scripts.

Get started on your path to automation greatness – Download the eBook now!

This World Backup Day, WIN with Altaro!

image

As World Backup Day approaches, we’re reminded of all the mishaps, backup scares, and near-catastrophes that we’ve experienced over the years – and how grateful we were to have backup during those times!

If you use Microsoft 365/Office 365, Hyper-V or VMware, celebrate with us. All you have to do is sign up for a 30-day free trial of either Altaro VM Backup or Altaro Office 365 Backup – it’s your choice!

What can you win?

· Receive a guaranteed €20 Amazon voucher when you sign up for and use the trial of Altaro Office 365 Backup or Altaro VM Backup

· Get a chance to WIN one of our Grand Prizes when you tell us about your funniest IT catastrophe!

What are you waiting for? Sign up now!

Microsoft Ignite Cloud Skills Challenge 2021

2021-03-04_13h00_32

During this month (March 2021), you can do the ‘Microsoft Ignite Cloud Skills Challenge to earn a free Microsoft Exam voucher for the following exams:

AZ-104: Microsoft Azure Administrator
DP-100: Designing and Implementing a Data Science Solution on Azure
MS-700: Managing Microsoft Teams
MS-100: Microsoft 365 Identity and Services
MS-101: Microsoft 365 Mobility and Security
DA-100: Analyzing Data with Microsoft Power BI
SC-200: Microsoft Security Operations Analyst
SC-300: Microsoft Identity and Access Administrator
SC-400: Microsoft Information Protection Administrator

This is a great opportunity to raise your knowledge and get one Microsoft exam for free!

You can find register and find more information about the challenge in the link below!
https://csc.docs.microsoft.com/ignite/officialrules/March2021

Insider Preview: Windows Server 2022

Microsoft has releashed the Insider Preview of Windows Server 2022. There is not that much information available, but a few new features are: Microsoft Edge with the Chromium engine is installed by default, TLS 1.3 support, AES-256 encryption for SMB traffic and a realy great look!!

You can download Window Server 2022 insider preview here.

You can download the: ISO, VHDX, Microsoft Server Language Pack/Features on Demand and Windows Admin Center.

I already installed the new Insider Preview and here are some first pictures.

2021-02-26_18h18_24   2021-02-26_18h25_32 2021-02-26_19h00_10   2021-02-26_19h21_192021-02-26_19h23_18   2021-02-26_19h25_05

How to check what features are installed on your SQL environment

When you need to know more information about your SQL environment or cluster, you can check every SQL server separate from each other. This is time consuming to do, definitely if you have a big SQL cluster or environment.

You can use also automate this steps, to use this very simple command!

Go to your SQL environment and browse to the following directory (it depends per SQL version)
* SQL Server 2012 (110)
* SQL Server 2014 (120)
* SQL Server 2016 (130)
* SQL Server 2017 (140)
* SQL Server 2019 (150)
’%programfiles%\Microsoft SQL Server\110\Setup Bootstrap\SQL2012” from the command prompt. Run the command:
’setup.exe /ACTION=RunDiscovery’

By default, there will be created a new file called ‘Summary.txt’, with the configuration of your SQL environment, cluster or AOAG if you’re using Always-On Availability Groups.. Not very usefull and readable. Not very readable, so now Powershell comes in!

Start Powershell and run the following command:
Get-Content “<location of your summary.txt file>. Now you get a report!!

2021-02-26_10h06_15   2021-02-26_10h07_262021-02-26_10h07_50   2021-02-26_10h09_15