Install Roles and Features using PowerShell DSC
This IT Pro Challenge virtual lab shows learners how to use Windows PowerShell, and PowerShell Integrated Scripting Environment (ISE) to use both graphical and command-line interfaces to create, run and start a Desired State Configuration (DSC) of the Print-Server, FS-data-Deduplication, BITS and Windows-Server-Backup options.
In this IT Pro Challenge, learners will understand how to use the graphical Windows PowerShell, and command-line Windows PowerShell Integrated Scripting Environment (ISE) to create, run, and start a Desired State Configuration (DSC) of the Print-Server, FS-data-Deduplication, BITS and Windows-Server-Backup options. As a result, learners will become familiar with WindowsFeature commands. The skills acquired in this lab are useful for a system administrator, network administrator, or network engineer.
The scenario for this hands-on lab is that you are the system administrator, and your company has a large number of servers to manage. You are using the Windows Server Manager to add roles and features to the servers, but this method only allows roles and features to be installed on one server at a time, which makes it increasingly difficult. You need to change how you manage your servers, so you will use the Windows PowerShell Desired State Configuration (DSC) to manage roles and features on the servers. To accomplish your goal, you will first analyze the currently installed roles and features and then run a command to install the Windows Backup feature. Then you will create and run a DSC configuration script and then start the DSC configuration.
DSC is a management platform which allows you to use a PowerShell script to specify a configuration as code.
Configure your environment
To begin the lab, you need to sign in to the Azure portal, display the virtual machine (LabVM), and ensure that the status is Running. Then you need to use Remote Desktop Protocol (RDP) to connect to the virtual machine, launch Windows Powershell as an administrator, and run the New-Item -Path "C:" -Name "Class" -ItemType "Directory" command to create C:\Class.
Analyze roles and features
In Windows PowerShell, you need to run the Get-WindowsFeature -Name Print-Server, FS-Data-Deduplication, Bits, Windows-Server-Backup command to determine the state of the Print-Server, FS-Data-Deduplication, BITS, and Windows-Server-Backup features. Next, you will install the Windows Server Backup feature by running the Install-WindowsFeature -Name Windows-Server-Backup -IncludeManagementTools command and verify that Windows Backup Feature was successfully installed by running the Get-WindowsFeature -Name Windows-Server-Backup command.
Create a DSC configuration
Now, using Window PowerShell Integrated Scripting Environment (ISE), you will create and save a new document (FileServerDSC.ps1) in the folder you created in the first step of the lab (C:\Class). Then you need to create a new DSC configuration (FileServer) that accepts a parameter, removes the Windows Server Backup feature, installs the Print Server, Data Deduplication, and BITS features, and creates a folder (Logs) in C:.
Run the DSC configuration
Now, you will use Windows PowerShell ISE to run the script that you just created. Then you will run the FileServer -OutputPath C:\FileServer -ComputerName LabVM command to run the FileServer configuration and view the contents of the C:\FileServer\LabVM.mof file by running the ise C:\FileServer\LabVM.mof command.
Start the DSC configuration
Finally, you will use Windows PowerShell ISE to run the Start-DscConfiguration -Path C:\FileServer -Wait -Verbose command. This starts the FileServer DSC configuration using the Wait and Verbose parameters. You need to verify the installation state of the Print Server, FS Data Deduplication, BITS, and Windows Server Backup features.
By taking this virtual lab, you will learn how to use Windows PowerShell to analyze roles and features, create a DSC configuration script that removes the Windows Server Backup feature, installs the Print Server, Data Deduplication, and BITS features, and creates a folder. You will learn how to run and start the DSC configuration script that you created.
The Add and Manage Domain Controllers guided virtual lab, provided by IT Pro Challenges, has ...
This IT Pro Challenge virtual lab shows learners how to use the Microsoft Azure Portal ...