Share This Post

PowerShell

Tip: Pulling Content into PowerShell Directly from a Text File

Tip: Pulling Content into PowerShell Directly from a Text File

If you ever want to pull in text from a file in the operating system folders, use the following command:

Get-Content -Path C:\TempDir\textfile.txt

This example uses the -Path statement to retrieve and display the content from textfile.txt in the C:\TempDir directory.


Looking for an awesome, no-nonsense technical conference for IT Pros, Developers, and DevOps? IT/Dev Connections kicks off in Dallas, Texas in 2018!

IT/Dev Connections

Share This Post

Leave a Reply