Would you like to learn how to use HERE-STRING on Powershell? In this tutorial, we will show you how to use the Powershell feature named HERE-STRING in a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Powershell - Using HERE-STRING

Start a Powershell command-line.

Start Powershell

HERE STRING example using single quotes.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

HERE STRING example using double quotes.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

HERE STRING inside a variable.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Powershell script inside HERE-STRING.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Assign variables inside HERE-STRING.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Encrypted Powershell script using HERE-STRING.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Run the encrypted version of the Powershell script.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Congratulations! You learned how to use HERE-STRING using Powershell.