Recently I found that we can execute a PowerShell script in a docker container. There is a base image for PowerShell in docker hub and you can use that to create your own image with your PowerShell script. Now when you create docker image and container from that, your PowerShell script can execute inside that container.
Example: https://github.com/Arnab-Developer/PowerShellInContainer