A few things …
You’re creating the directory “CEMLog” (no “s” at the end) and then copying to “CEMLogs”.
You should also not have a trailing backslash on the xcopy command for the target directory.
You should not mix the use of ‘dos’ commands with ‘waithidden’, so either use ‘dos xcopy’ or ‘waithidden cmd /c’, but not both.
You probably should not use the ‘dos’ family of commands, those are (I believe) deprecated in favor of ‘waithidden’.
And you may be encountering a problem with ‘waithidden’ and multiple quoted command-line parameters. I’ve had problems with that before. The easiest workaround is to create a batch file and execute it, so you don’t have to worry about the quoted parameters. It may be possible to rewrite the xcopy command as
waithidden "cmd /C xcopy "C:\Program Files\Tivoli\TSM\baclient*.log" "c:\Temp\CEMLogs\" /Y"
but I haven’t tried that. Generally I’d build a batch file out of it instead, like
action uses wow64 redirection false
createfile until EOF_EOF_EOF
xcopy "C:\Program Files\Tivoli\TSM\baclient*.log" "c:\Temp\CEMLogs" /Y
WEVTUtil query-events Microsoft-Windows-WindowsUpdateClient/Operational /count:50 /rd:true /q:"Event[System[(EventID=40)]]" > c:\Temp\CEMLogs\Eventlogs.log
move __createfile MyBatch.cmd
waithidden cmd /c MyBatch.cmd
Hope this helps