Tested locally. I Don't have a network to try a working case.
szMachine: either name or IP should work.
szMessage*: some blah's for remote user to be aware of your action.
dwTimeout*: how many seconds to show your blah's.
bForce: close all applications with no confirmation.
bReboot: follow shutdown with a restart.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...