# How run powershell scripts in docker compose

**URL:** <https://forums.docker.com/t/how-run-powershell-scripts-in-docker-compose/49951>\
**Category:** Docker Desktop\
**Created:** [April 25, 2018, 3:27pm UTC](https://forums.docker.com/t/how-run-powershell-scripts-in-docker-compose/49951 "2018-04-25T15:27:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![balajepalli](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@balajepalli](https://forums.docker.com/u/balajepalli)\
**Post date:** [April 25, 2018, 3:27pm UTC](https://forums.docker.com/t/how-run-powershell-scripts-in-docker-compose/49951/1 "2018-04-25T15:27:11Z")

</div>

I am trying to spin a new container and run a powershell script with in the new container. This is my docker compose file

version: “3”  
services:  
webapp:  
build: .  
image: “iis”  
command: powershell -executionpolicy bypass “C:\docker\sharedFiles\scripts\generic\_script.ps1” #tried with containerpath “C:\sharedFiles\scripts\generic\_script.ps1”  
ports:  
- “80:8000”  
networks:  
nat:  
ipv4\_address: 172.20.128.2  
volumes:  
- “C:/docker/sharedFiles:c:/sharedFiles”  
networks:  
nat:  
external: true

I am able to spin the cotnainer, but the PS script is not getting executed. What am i missing ?
