title: Setting Environment Variables in SQL Agent Job for SSIS using PowerShell
body: <p>I was trying to simplify the scheduling SQL Agent Job for SSIS and I came across <a href="http://microsoft-ssis.blogspot.in/2016/10/using-powershell-to-create-sql-agent.html" rel="nofollow noreferrer">this</a> wonderful article. Now I need to assign Environment variables for the scheduled SSIS package using this script. </p>
  
  <p>Passing <code>ENVREFERENCE [identifier]</code> attribute in command can solve this, but I want to pass the <code>[identifier]</code> dynamically.</p>
  
  <p>Can anyone suggest the best way to do so.</p>
  
  <p>Thanks in advance.    </p>