Scripts which are startet during the WinPE can’t write a log file to the client. It’s hard to troubleshoot them witout logging infromation. A easy way to get back information to the sccm server are status messages.
Use the following commands to get a log directly to the status messages.
Powershell: Write-Host "Text"
VBS: Wscript.Echo "Text"