Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Wie kann ich die Items einer Powershell Combobox in eine Textdatei sichern und beim nächsten Start des Skripts wiederherstellen?

$
0
0

Zusätzlich wäre es schön, doppelte Einträge zu entfernen.

Ein Tip wäre schön!

function FNprocessData1 {
  $gname = $combobox1.text
  $g1name = "*"+$gname+"*"
  $ComboBox1.Items.Add($gname)
  $comboBox1.sorted = $true;
    get-aduser -Filter "name -like '$g1name'" -properties *| sort name | ft -auto Name,SamAccountname,telephonenumber > c:\temp\result1.txt
  $net = get-content c:\temp\result1.txt   
  $richTextBox1.Clear()
  # Parse each line of the result, add a linebreak and append it to the RichTextBox
  foreach ($line in $net) {
      $richTextBox1.Appendtext($line+[char]13+[char]10)






Viewing all articles
Browse latest Browse all 2314


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