Operating system: Windows 10 Pro (64 Bit)
PowerShell version(s): V5
Hey there,
I´ve a weird output crop in PowerShell Studio. I have a Script, with read out some informations from printers with snmp and put them to a output variable. In the end the variable will printed in PowerShell.
Code: Select all
$ausgabe
$ausgabe = $ausgabe +"==="+$PrinterModell.Data+ "===`n"
$ausgabe = $ausgabe + "Tonermodell: "+$TonerType.Data + "`n"
$ausgabe = $ausgabe + "Tonerstand: " + $Tonerlevel.Data + " Prozent `n"
Write-Host $ausgabe
If I run the script in PowerShell Studio I only get two lines an output: If I run the script in native Windows PowerShell, I get the full output with all three lines: If I set a breakpoint in the code and inspect the "$ausgabe" variable there are all the 3 lines in it. The funny thing is, if I comment out a line I can get the other two lines back correctly.
For example, a
Code: Select all
$ausgabe
$ausgabe = $ausgabe +"==="+$PrinterModell.Data+ "===`n"
#$ausgabe = $ausgabe + "Tonermodell: "+$TonerType.Data + "`n"
$ausgabe = $ausgabe + "Tonerstand: " + $Tonerlevel.Data + " Prozent `n"
Write-Host $ausgabe
Thanks and greetings from German!