I believe this is a simple question, but I can\'t wrap my head around it. I want to do diagnostic commands in command shell on Windows. Like this:
$cmd =
Cast to an array of strings, maybe. Like this, for your last example:
$message = @(Get-Content c:\topsecret\testme.txt)
Or this for the second one:
$message = [string[]](ipconfig)