Configure a VM using a PowerShell DSC Extension
This “Configure a VM using a PowerShell DSC Extension” IT Pro Challenges virtual lab teaches learners how to configure a virtual machine using a PowerShell Desired State Configuration (DSC) extension. Skills learned in this lab are important in various job roles such as Enterprise Architect, Network Administrator, and Azure Administrator.
The Desired State Configuration (DSC) provides a declarative model for server configuration administration. In other words, cloud engineers or administrators can define how they want a server to be configured. This is executed by using a PowerShell and the Windows Workflow engine. In this lab, learners will gain experience in configuring a virtual machine by using a PowerShell DSC Extension to recognize settings that drift from the desired configuration. Other guided challenges in this series are “Configure Near Real-Time Metric Alerts” and “Configure a Virtual Machine Using a Custom Script Extension”.
The PowerShell DSC extension enables server administrators in many ways of reacting to different problems and avoiding specific definitive methods. This virtual lab is intended for people who want to work in the complex computing environment of medium to large companies. Learners seeking a thorough understanding of how to configure a virtual machine to deliver mission-critical administration will greatly benefit from this hands-on lab. Not only will this virtual lab allow you to gain hands-on skills required to assess, deploy, and use PowerShell Desired State Configuration (DSC), but it will also prepare you to confidently use the Microsoft Azure portal.
Understand the Scenario
In this IT Pro Challenge virtual lab, you're a cloud operations engineer assigned to create a Windows virtual machine in Microsoft Azure. Your job is to automate the configuration of a web app on the new server and block configuration drift. You will deploy a PowerShell Desired State Configuration (DSC) extension and check that the web app is loading properly.
Create a Windows virtual machine
In section 1 of the lab, you will sign in to the Microsoft Azure portal by using given login credentials. You will create a Windows Server virtual machine in the existing resource group and name it. You will then set the username and password of this machine and set the values of various properties. Finally, you will set the various properties such as the size, HTTP, and RDP (Remote Desktop Protocol) public inbound ports, and then disable all monitoring.
Create a ZIP file that contains the configuration
In this section, you will get to learn how to create a zip file that contains the configuration for the windows virtual machine created in section 1 of the lab. You will copy the content from the Windows PowerShell DSC file and save it on your local computer. This segment is important because Configuration file is a vital component of the management and maintenance of Windows-based servers. The Zip file enables a PowerShell script to define the configuration of the machine utilizing a model in a simple way that is easy to manage and follow.
Add a PowerShell DSC extension
After successfully creating a zip file, in this section, you will learn how to create a PowerShell Desired State configuration extension for the virtual machine created in Section 1 of the lab. You will then learn how to upload a zip file and finally, how to define the latest version of the Azure Desired State Configuration extension. By allowing the Desired State Configuration (DSC), you can control and watch the configurations of your servers. Settings that drift from the desired configuration can be recognized or auto-corrected.
Check your work
Finally, in this section of the virtual lab, you will verify that the web page is displaying the proper deployment message by using Settings and extensions and adding a PowerShell Desired State Configuration resource.You will check the virtual machine blade overview page and work with the public IP address to test the deployment.
Lab Summary Conclusion
After completing the “Configure a VM using a PowerShell DSC Extension” virtual lab, you will have accomplished the following:
- Created a new Windows virtual machine
- Created a PowerShell DSC extension to configure the virtual machine
- Tested the results of the configuration
If you are looking to effectively configure a virtual machine and utilize PowerShell Desired State Configuration (DSC) extension, this hands-on virtual lab is the ideal skill enhancement vehicle for you.
This Azure Infrastructure Solutions IT Pro Challenge helps learners understand some of the services in ...
In this “Configure a VM using a Custom Script Extension” IT Pro Challenges virtual lab, ...