反引号(`)运算符也称为自动换行符。它允许多行编写命令。它也可以用于句子中的换行(`n)或制表符(`t)。请参阅以下示例-
例子1
Get-Service * | Sort-Object ServiceType ` | Format-Table Name, ServiceType, Status -AutoSize
它将成为
Get-Service * | Sort-Object ServiceType | Format-Table Name, ServiceType, Status -AutoSize
验证输出为
Name ServiceType Status ---- ----------- ------ MSSQLServerADHelper100 Win32OwnProcess Stopped ntrtscan Win32OwnProcess Running ...
例子2
使用换行和制表符。
> Write-host "Title Subtitle" Title Subtitle > Write-host "Title `nSubtitle" Title Subtitle > Write-host "Title `tSubtitle" Title Subtitle