...

Programming languages - Powershell

Back to Course

Lesson Description


Lession - #117 PowerShell-Backtick


Backtick ('>
powershell operator is likewise called word-wrap operator . It permits an order to be written in various lines. It tends to be utilized for new line ('n>
or tab ('t>
in sentences too. See the models underneath −

Example 1

Get-Service * | Sort-Object ServiceType `
| Format-Table Name, ServiceType, Status -AutoSize
It will become

Get-Service * | Sort-Object ServiceType | Format-Table Name, ServiceType, Status -AutoSize

Output

    Name                                    ServiceType  Status
----                                        -----------  ------
MSSQLServerADHelper100                      Win32OwnProcess Stopped
ntrtscan                                    Win32OwnProcess Running
...

Example 2

> Write-host "Title Subtitle"
Title Subtitle

> Write-host "Title `nSubtitle"
Title 
Subtitle

> Write-host "Title `tSubtitle"
Title   Subtitle