I would like to add an asterisk to the beginning of liner in output:
$SYSLST1 = "OsName","OsVersion","TimeZone","CsName"
$X = (Get-ComputerInfo -Property $SYSLST1 | Format-List | Out-String).Trim()
$Y = ForEach ($Z in $X){
$Z.insert(0," * ")
}
Write-Host $Y
But it's only doing the first line:
* OsName : Microsoft Windows Server 2016 Standard
OsVersion : 10.0.14393
TimeZone : (UTC-05:00) Eastern Time (US & Canada)
CsName : SIS-2016-INT-ST