I am new to WSUS, Powershell and AutoIt. I am writing a program to approve multiple updates just with a few clicks (instead of 5 clicks per update and Group). Therefore i have a Powershell-Script that searches for all the computer-Groups and available Updates.
The scripts themselves aher working, i just have Problems calling them in AutoIt (as i already found out, i have to import the module UpdateServices but i can´t get it working).
Here is one part of my AutoIt-Program:
$sComSend = '-ExecutionPolicy ByPass import-module UpdateServices; ' & $sScript & '\Search_Updates.ps1 -FilePath ' & $sUpdateOutput
ShellExecuteWait("powershell.exe", $sComSend)
But this doesn´t work. Another try was this:
$sComSend = 'powershell.exe import-module UpdateServices; "-ExecutionPolicy ByPass ' & $sScript & '\Search_Updates.ps1 -FilePath ' & $sUpdateOutput & '"'
RunWait(@ComSpec & " /c " & $sComSend, "", @SW_SHOW , $stdout_child)
But this also didn´t work. To be honest, in the second one, i don´t even know what the most of These Parameters exactly mean. Does anybody see my mistake?
Thanks :-)