Reminder, I am a Powershell infant, with little or no experience. Try not to laugh to hardy at the format and attempts of this coding.
THE ISSUE: see the image.
Multiple blank lines at the beginning of the Get-ComputerInfo output. Using the attached image, the left positioned vertical numbering is overlayed with the output of a script that recently ran Get-ComputerInfo; notice the empty-space at lines three and four. This space has been confirmed as coming from Get-CompterInfo, which is generated regardless if run from a ps1 script or the cli:
Cli – Get-computerInfo "OsName", "OSDisplayVersion", "OsVersion", "osinstalldate"
Script.ps1 -- $_info = Get-computerInfo "OsName", "OSDisplayVersion", "OsVersion", "osinstalldate"
write-output $_info
The second part of this concern, within the image lines three and four begin the initial output –from the script
$_info = Get-computerInfo "OsName", "OSDisplayVersion", "OsVersion", "osinstalldate"
write-output $_info
… during the same script job, as it runs on the next machine (remoting), the blank lines are gone for the duration; until the script is again initiated from the beginning; evidenced by comparing lines three and four –to- lines eleven and twelve.
The only possible resolve that I have not attempted was Format-Custom, that’s a bit much for this infant to swallow. Besides, I’m not sure what affect, if any, it would have on whatever Get-ComputerInfo has already done.
As posted earlier, these blank lines only happen during the first run on the first machine. Please don’t fix the code, instead I’m requesting the required articles to read, that will teach –how to get this done. I 've already tried, while reading along with the respective help file, the following: Write-Output and Write-Host. At this point I feel like I’m driving on a rural-road with no moon or head-light’s;
your thoughts?



