title: Powershell not sourcing .profile
body: <pre><code> New-SshSession -ComputerName cagent01 
   $A= Invoke-SshCommand -InvokeOnAll -Quiet -Command '~/.bash_profile'
   $B= Invoke-SshCommand -InvokeOnAll -Quiet -Command '~/.bashrc'
   $Result = Invoke-SshCommand -InvokeOnAll -Quiet -Command './start'
   $Ora = Invoke-SshCommand -InvokeOnAll -Quiet -Command 'echo $ORACLE_HOME'
   write-host "Oracle home is $Ora"
   Remove-SshSession -RemoveAll
  </code></pre>
  
  <p>i use PowerShell v3. This script isn't sourcing my .profile.
  I don't see $Ora printing any value. </p>
  
  <p>When I manually log into the server to do echo $PATH, it includes the ORACLE path </p>
  
  <p>echo $PATH </p>
  
  <p>/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/data/app/oracle/product/11.2.0/d‌​bhome_1/bin:/home/HEALTHLANGUAGE/scmbuild/bin:/home/db2inst1/sqllib/bin:/home/db2‌​inst1/sqllib/adm:/home/db2inst1/sqllib/misc</p>
  
  <p>The .bash_profile does export the PATH variable. 
  export PATH</p>
  
  <p>When I run a bamboo plan on this agent, it says ORACLE_HOME is not set. Manually loggin into the server sources the path correctly, but i want to do it using the script. </p>
  
  <p>Can someone please help me with a work around? Or is it not possible to do this using PowerShell for Linux servers?</p>