Hello and welcome to the board.

Here is some code to get you started. Code is untested so don't just run it as is, but review it and change as needed.

The Remote execute is not in the script but I've given you a link and you can search the board as well for other examples.



;See the UDF:  fnWMIService - Use the Win32_Service class of WMI to control services 
;http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83246

;To do the remote execution of the "wuauclt /resetauthorization /detectnow" look at this UDF
;RemoteExec() - execute a process on remote PCs
;http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83206

If Not @LogonMode
Break On
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')

Dim $sComputer, $sComputers, $Key
$sComputers = 'PC1','PC2','PC3','PC4'
$Key = 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\'
For Each $sComputer In $sComputers
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
If $sComputer
$Nul = DelValue($sComputer+$Key,'AccountDomainSid')
$Nul = DelValue($sComputer+$Key,'PingID')
$Nul = DelValue($sComputer+$Key,'SusClientId')
$Nul = fnWMIService('wuauserv','stop',$sComputer)
$Nul = fnWMIService('wuauserv','start',$sComputer)
EndIf
Next

Function fnWMIService($sService,$sMethod,Optional $sComputer)
Dim $objWMI,$objSrvc,$nul
If Not $sComputer $sComputer=@WKSTA EndIf
$objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$sComputer+"\root\cimv2")
If @ERROR<0 Exit VAL("&"+Right(DecToHex(@ERROR),4)) EndIf
$objSrvc = $objWMI.ExecQuery('Select * from Win32_Service WHERE Name = "'+$sService+'"')
For Each $objSrvc in $objSrvc
$nul=Execute("$"+"fnWMIService = $"+"objSrvc."+$sMethod)
Next
EndFunction