Hi,
i installed a Cygwin (https://www.cygwin.com/) in my windows server and now I can execute bash script in windows. I want to write script that implement bash script in my powershell script.
When I start this command in powershell
I see that it's a few command that are not recognize from powershell - rm et.c. When i start the script in cygwin terminal, i can execute without problem. I send too the bash script:
!/bin/bash
# define general stuff
host=.
certdir=/cygdrive/l/$host.
certdir_local=L:/$host..
outcert_cygwin=/cygdrive/c/certbot
storepass=.
# rm old pfx file
rm $outcert_cygwin/letsencrypt.pfx
# convert the cert to some tomcat shizzle
openssl.exe pkcs12 -export -out $outcert_cygwin/letsencrypt.pfx -inkey $certdir/privkey.pem -in $certdir/cert.pem -certfile $certdir/chain.pem -password pass:$storepass
# change permission of the cert
chmod 644 $outcert_cygwin/letsencrypt.pfx
# additional info, for server.xml
echo
echo "Make sure the contents of c:\certbot\tomcat_server_config.txt are"
echo "added to the tomcats server.xml"
echo
echo "Exiting."
exit 0
# else
# echo "Exiting."
# exit 0
# fi
# exit 0
Can anybody help me how this command would be recognized from powershell? For example the command rm is available. See you screenshot: