I have added label text in PS1 form, and it get value but ffor new word show in same line not go to next line, i have tried adding (\n) but its does help in PS1 script.
Foreach($lt in $selectd){
$Resource = Get-CMDevice -Name $lt | Where-Object{$_.ResourceID} -ErrorAction SilentlyContinue
$ResourceID = $Resource.ResourceID
If($ResourceID -ne $null)
{
$lbl1.Text += "Device Exist $ResourceID \n"
}
$oReturn=[System.Windows.Forms.Messagebox]::Show($Resource.ResourceID)
}
Support@Mytechnet.me