評論

通過使用 #(雜湊)符號預先新增行來評論電源指令碼

# This is a comment in powershell
Get-ChildItem

你還可以分別在註釋的開頭和結尾使用 <# 和 #> 進行多行註釋。

<#
This is a 
multi-line
comment
#>
Get-ChildItem