
- PowerShell Tutorial
- PowerShell - Home
- PowerShell - Overview
- PowerShell - Environment Setup
- PowerShell - Cmdlets
- PowerShell - Files and Folders
- PowerShell - Dates and Timers
- PowerShell - Files I/O
- PowerShell - Advanced Cmdlets
- PowerShell - Scripting
- PowerShell - Special Variables
- PowerShell - Operators
- PowerShell - Looping
- PowerShell - Conditions
- PowerShell - Array
- PowerShell - Hashtables
- PowerShell - Regex
- PowerShell - Backtick
- PowerShell - Brackets
- PowerShell - Alias
- PowerShell Useful Resources
- PowerShell - Quick Guide
- PowerShell - Useful Resources
- PowerShell - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Powershell - Backtick
Backtick (`) operator is also called word-wrap operator. It allows a command to be written in multiple lines. It can be used for new line (`n) or tab (`t) in sentences as well. See the examples below −
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
Verify the output as
Name ServiceType Status ---- ----------- ------ MSSQLServerADHelper100 Win32OwnProcess Stopped ntrtscan Win32OwnProcess Running ...
Example 2
Use of new line and tab.
> Write-host "Title Subtitle" Title Subtitle > Write-host "Title `nSubtitle" Title Subtitle > Write-host "Title `tSubtitle" Title SubtitlePrint
Advertisements