ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 340 - SK0-005 discussion

Report
Export

Which of the following symbols is used to write a text description per line within a PowerShell script?

A.
%
Answers
A.
%
B.
@
Answers
B.
@
C.
&
Answers
C.
&
D.
#
Answers
D.
#
Suggested answer: D

Explanation:

The # symbol is used to write a text description per line within a PowerShell script. A text description is also known as a comment, which is a line of code that is ignored by the PowerShell interpreter and serves as documentation or explanation for human readers. The # symbol indicates that everything following it on the same line is a comment and not part of the script commands or expressions. For example:

This is a comment in PowerShell

Write-Host "Hello World" # This command prints Hello World to the console

Reference: CompTIA Server+ Certification Exam Objectives, Domain 6.0: Troubleshooting, Objective 6.3: Given a scenario, troubleshoot scripting errors using PowerShell commands.

asked 02/10/2024
Hector Quintero
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first