A. You can create simple task with your script but you need to update curly bracket to avoid conflict with BigFix relevance.
B. For logs you need to run your script manually to see where logs are being generated or you can direct the path in script itself or while executing it using BigFix action script.
C. After that you can use it as a pre task in baseline or any method of deployment.
But based on your question i would suggest sync with your BigFix Admin, they will help you to achieve all these steps.