I've been asked to quickly run up a application that creates a text file of computers in an OU and then loops through each line to reboot them one by one.
I would really like to show a progress bar to give a visual indication but I've never done one of these before:
Here's my existing code:
Dim str2 As String = File.OpenText(text).ReadLine
Dim reader2 As New StreamReader(text)
Do While Not reader2.EndOfStream
str2 = reader2.ReadLine
Process.Start("C:\Windows\System32\shutdown.exe", " /m \\" & str2 & " /r /t 2 /d p:0:0")
Catch ex As SystemException
Can anyone show me how to get "ProgressBar1" into this loop please?