I have text in a file and I would like to grab all the text from the file and assign it to a variable. Something like this:
$myString = Get-TextFromFile "myFileName.txt"
Is there a built in command for this? All I could find online were commands for how to parse file content into an object, like with Get-Content
but I’m not looking for that, I just want the raw text as a string.