# Comment

*noun*

say it: **“KOM-ent”** **/ˈkɑmɛnt/**

A note written in a script for people to read, which PowerShell skips when it runs the script.

## What is a **comment** in a PowerShell script?

A **comment** is a note for the people who read a script. PowerShell skips everything from a `#` to the end of the line, and everything between `<#` and `#>`, so a comment can say what a script does or why a line is there.

```powershell
# morning.ps1: my start-of-the-day check.
$drive = Get-PSDrive -Name C   # the drive Windows is on
<#
Next: add the weather.
#>
```

## In a sentence

- “The first **comment** in morning.ps1 says what the script is for.”
- “Sam wrapped his to-do notes in a **comment** between &lt;# and #> so PowerShell would skip them.”

Level: Novice · [More PowerShell terms at this level](https://www.ask-codey.com/glossary?category=powershell&level=1)

Updated: November 10, 2026

## In other subjects

- [Comment in C#](https://www.ask-codey.com/glossary/comment-c-sharp)
- [Comment in CSS](https://www.ask-codey.com/glossary/comment-software-development)
- [Comment in Java](https://www.ask-codey.com/glossary/comment-java)
- [Comment in JavaScript](https://www.ask-codey.com/glossary/comment-javascript)
- [Comment in Python](https://www.ask-codey.com/glossary/comment)
- [Comment in Unix](https://www.ask-codey.com/glossary/comment-unix)

Source: https://www.ask-codey.com/glossary/comment-powershell
