Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Label.Text New line

$
0
0

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



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>