# How can i run a ps1 script with currenty set environment variable?

**URL:** <https://discourse.chef.io/t/how-can-i-run-a-ps1-script-with-currenty-set-environment-variable/12503>\
**Category:** Chef Infra (archive)\
**Created:** [January 30, 2018, 8:20am UTC](https://discourse.chef.io/t/how-can-i-run-a-ps1-script-with-currenty-set-environment-variable/12503 "2018-01-30T08:20:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankur760](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Ankur760](https://discourse.chef.io/u/Ankur760)\
**Post date:** [January 30, 2018, 8:20am UTC](https://discourse.chef.io/t/how-can-i-run-a-ps1-script-with-currenty-set-environment-variable/12503/1 "2018-01-30T08:20:12Z")

</div>

powershell\_script ‘da-dba’ do  
code ". c:\script\dba-da.ps1"  
end

i am setting a environment variable for sqlplus first time before this resource get executed but still  
when this script run its give me error that sqlplus is not recognized as term  
can anyone help me how to run this script with by setting env variable.
