nerdexam
CompTIA

SK0-005 · Question #402

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

The correct answer is D. #. 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…

Server administration

Question

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

Options

  • A%
  • B@
  • C&
  • D

How the community answered

(68 responses)
  • A
    6% (4)
  • B
    1% (1)
  • C
    3% (2)
  • D
    90% (61)

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.

Topics

#PowerShell#Scripting#Comments#Syntax

Community Discussion

No community discussion yet for this question.

Full SK0-005 Practice