1.
When did PowerShell become open-source and cross-platform?
Correct Answer
B. August 18, 2016
Explanation
PowerShell became open-source and cross-platform on August 18, 2016. Before this date, it was initially a Windows component known as Windows PowerShell. The move to open-source and cross-platform made PowerShell accessible to a broader audience, including users of Linux and macOS.
2.
Which scripting language is used in PowerShell?
Correct Answer
C. PowerShell Scripting Language
Explanation
PowerShell uses its own scripting language, known as the PowerShell Scripting Language. This language is designed specifically for PowerShell and allows users to create scripts to automate various tasks in the command-line environment.
3.
What are cmdlets in PowerShell?
Correct Answer
A. Specialized .NET classes implementing a particular operation
Explanation
Cmdlets in PowerShell are specialized .NET classes implementing a particular operation. They are the building blocks of PowerShell and allow users to perform administrative tasks by executing specific commands. Cmdlets follow a verb-noun naming convention and are designed to work in conjunction with the .NET API.
4.
Which version of PowerShell was integrated with Windows 7 and Windows Server 2008 R2?
Correct Answer
B. PowerShell 2.0
Explanation
PowerShell 2.0 was integrated with Windows 7 and Windows Server 2008 R2. It included changes to the scripting language, hosting API, and introduced more than 240 new cmdlets. The integration enhanced the capabilities of PowerShell on these operating systems.
5.
What is the purpose of PowerShell remoting in version 2.0?
Correct Answer
A. Allows scripts and cmdlets to be invoked on a remote machine or a set of remote machines
Explanation
PowerShell remoting, introduced in version 2.0, allows scripts and cmdlets to be invoked on a remote machine or a set of remote machines. This feature enhances the flexibility of PowerShell, enabling administrators to perform tasks on both local and remote Windows systems.
6.
What does PowerShell 3.0 introduce to support scheduled jobs?
Correct Answer
A. Background jobs
Explanation
PowerShell 3.0 introduces background jobs, also called PSJobs, which allow a command sequence or pipeline to be invoked asynchronously. These jobs can be scheduled to run on a preset time and date using the Windows Task Scheduler infrastructure. It enhances the automation capabilities of PowerShell by enabling the execution of tasks at specific times.
7.
Which version of PowerShell was released with Windows 10 Anniversary Update and Windows Server 2016?
Correct Answer
B. PowerShell 5.1
Explanation
PowerShell 5.1 was released along with the Windows 10 Anniversary Update and Windows Server 2016. It introduced features such as the new class and enum keywords for object-oriented programming and improvements to the debugging capabilities. PowerShell 5.1 was the last version exclusively made for Windows.
8.
What is the significance of PowerShell Core 6.0?
Correct Answer
A. Cross-platform, independent of Windows, free, and open source
Explanation
PowerShell Core 6.0 is significant because it marked the transition to being cross-platform, independent of Windows, free, and open source. It became available for Windows, macOS, and Linux, expanding its usability beyond the Windows ecosystem. PowerShell Core 6.0 introduced a major shift in accessibility and licensing.
9.
What is a notable feature of PowerShell 7.0?
Correct Answer
B. Compatibility with modules that ship with Windows
Explanation
A notable feature of PowerShell 7.0 is compatibility with modules that ship with Windows. PowerShell 7.0 aims for near parity with Windows PowerShell 5.1, making it a viable replacement. This feature enhances compatibility with existing modules, providing users with a familiar environment and reducing friction when migrating from Windows PowerShell to PowerShell 7.0.
10.
Which version of PowerShell is the last supported Windows PowerShell version?
Correct Answer
C. PowerShell 5.1
Explanation
PowerShell 5.1 is the last supported Windows PowerShell version. It was released along with the Windows 10 Anniversary Update and Windows Server 2016. Subsequent versions, including PowerShell Core and PowerShell 7.x, are cross-platform and have broader compatibility, making them the focus for future development.
11.
What does PowerShell 7.2 use as its underlying framework?
Correct Answer
A. .NET 6.0
Explanation
PowerShell 7.2 uses .NET 6.0 as its underlying framework. This choice of framework ensures that PowerShell 7.2 aligns with the latest advancements in the .NET ecosystem. Using .NET 6.0 provides performance improvements, new features, and compatibility with the evolving landscape of the .NET platform.
12.
Which version introduced the error view and the Get-Error cmdlet?
Correct Answer
A. PowerShell 7.0
Explanation
PowerShell 7.0 introduced the error view and the Get-Error cmdlet. These features enhance error handling and troubleshooting capabilities by providing a more comprehensive view of errors. The introduction of error-related enhancements is a part of PowerShell's continuous effort to improve the user experience and facilitate effective debugging and diagnostics.
13.
What is the focus of PowerShell 7.4?
Correct Answer
A. Performance improvements, bug fixes, and cmdlet/language enhancements
Explanation
The focus of PowerShell 7.4 is on performance improvements, bug fixes, and smaller cmdlet and language enhancements that improve developer productivity. PowerShell 7.4 builds upon the strengths of previous versions to provide a more efficient and reliable scripting environment. Continuous improvement and refinement are key aspects of each new release.
14.
Which feature introduced in PowerShell 3.0 allows users to control when the BeginProcessing(), ProcessRecord(), and EndProcessing() functions of a cmdlet are called?
Correct Answer
A. Steppable Pipelines
Explanation
Steppable Pipelines, introduced in PowerShell 3.0, allow users to control the execution flow of a cmdlet. This feature enables the user to determine when the BeginProcessing(), ProcessRecord(), and EndProcessing() functions of a cmdlet are called. It provides greater flexibility in handling the different phases of cmdlet processing.
15.
What is the primary focus of PowerShell 4.0?
Correct Answer
A. Desired State Configuration
Explanation
The primary focus of PowerShell 4.0 is Desired State Configuration (DSC), which provides declarative language extensions and tools for the deployment and management of configuration data. It introduces features to manage and configure systems using DMTF management standards and WS-Management Protocol. DSC helps maintain consistent system configurations.