PowerShell 5.0 and Desired State Configuration Quiz Questions and Answers

The trust relationship is obtained when the machines are members of the same _____ domain.

Answer :
  • Active Directory

Explanation :

The trust relationship is obtained when the machines are members of the same Active Directory domain. Theprerequisite to use DSC is the WinRM HTTP 5895 protocol (Windows Remote Management – that is theimplementation of the standard WS-Management on the Windows platform). It is, therefore, necessary to assurethe correct functioning of this component, so as to allow the remote execution of the PowerShell code.

Each target node has to be told to use pull mode, and given the _____ where it can contact the pull server toget configurations.

Answer :
  • URL

Explanation :

Each target node has to be told to use pull mode and given the URL where it can contact the pull server to getconfigurations. To do this, you have to configure the Local Configuration Manager (LCM) with the necessaryinformation. To configure the LCM, you create a special type of configuration, decorated with theDSCLocalConfigurationManager attribute.

The node keyword takes an array of strings that represent the names of the____.

Answer :
  • target nodes

Explanation :

The node keyword takes an array of strings that represent the names of the target nodes. We provide the array ofnames by using a PowerShell filter called Where() that accepts a script block. Inside this script block, we examineeach item in the array and inspect whether it matches the filter.

DSC is _____, autonomous, and uses declarative syntax in the files.

Answer :
  • idempotent

Explanation :

DSC is idempotent, autonomous, and uses declarative syntax in the files. Let’s look at some terms thatwe will use, as it’s better to have at least a basic concept of them at the beginning. We realize we’ve covered someof these already, but it won’t hurt to do a brief review.

An _____ language requires the user to determine what the end result should be, and tells the computer step-by-step how to achieve that result.

Answer :
  • imperative

Explanation :

An imperative language requires the user to determine what the end result should be, and tells the computer stepby- step how to achieve that result. It is the same as calling an Uber, but telling the driver step-by-step how you want to get to your destination.

The configuration scripts in DSC are based on _____, which we call DSC resources.

Answer :
  • building blocks

Explanation :

The configuration scripts in DSC are based on building blocks, which we call DSC resources. DSC resources arePowerShell modules with a specific set of options. The DSC resources have Microsoft support, and you canrequest bug fixes and feature changes.

An MOF file on the target node can be in one of three possible states. They are____________.

Answer :
  • Previous, Pending & Curren

Explanation :

An MOF file on the target node can be in one of three possible states. Previous Pending Current

What PowerShell cmdlet will show you the commands you have typed previously?

Answer :
  • get-history

What PowerShell symbols represent the current object crossing the pipeline?

Answer :
  • $_

What symbols go around a Where-Object filter?

Answer :
  • { }