<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: password in powershell to SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578470#M34370</link>
    <description>&lt;P&gt;Are you talking about the user/password that you need to supply to connect to SAS metadata/workspace?&amp;nbsp; If so, then use the credentials.xml scheme. Here's the SAS note:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/30/917.html" target="_blank" rel="noopener"&gt;http://support.sas.com/kb/30/917.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Update the version-specific folder location for your version of EG.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're talking about Prompts that you've built in with project prompts, then you need to use the Prompts property/methods in the EG automation API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the Project.Parameters, returns a ParameterList, which you can navigate as name-value item pairs.&amp;nbsp; (Sorry -- I don't have an example handy.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, if you just want to initialize these macro variables, use Project.CodeCollection.Add to add a new program with this code, use the Run method, and then run the rest of the project/flow.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/" target="_self"&gt;Example here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2019 15:33:50 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2019-08-01T15:33:50Z</dc:date>
    <item>
      <title>password in powershell to SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578412#M34367</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I launch my SAS Enterprise Guide projects via powershell scripts. I would like to know if it is possible to inform my password from the powershell and that the project sas guide the recovery then?&lt;BR /&gt;I do not know if I'm clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global password;

/* Connection serveur  */
options comamid=tcp;
%let server=server 0000;
signon noscript remote=server user="%upcase(&amp;amp;userid.)" password="%upcase(&amp;amp;password.)";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 14:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578412#M34367</guid>
      <dc:creator>isek</dc:creator>
      <dc:date>2019-08-01T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: password in powershell to SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578470#M34370</link>
      <description>&lt;P&gt;Are you talking about the user/password that you need to supply to connect to SAS metadata/workspace?&amp;nbsp; If so, then use the credentials.xml scheme. Here's the SAS note:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/30/917.html" target="_blank" rel="noopener"&gt;http://support.sas.com/kb/30/917.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Update the version-specific folder location for your version of EG.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're talking about Prompts that you've built in with project prompts, then you need to use the Prompts property/methods in the EG automation API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the Project.Parameters, returns a ParameterList, which you can navigate as name-value item pairs.&amp;nbsp; (Sorry -- I don't have an example handy.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, if you just want to initialize these macro variables, use Project.CodeCollection.Add to add a new program with this code, use the Run method, and then run the rest of the project/flow.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/" target="_self"&gt;Example here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578470#M34370</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-08-01T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: password in powershell to SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578695#M34378</link>
      <description>&lt;P&gt;Thanks Chris,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm talking about the user / password I need to provide to connect to the SAS metadata / workspace? I create a file credentials.xml but it doesn't work.&lt;BR /&gt;I have the SAS Guide 7.1 version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;credentials.xml :

&amp;lt;xml FileVersion ="7.1"&amp;gt; &amp;lt;credentials&amp;gt;&amp;lt;server name="server1" userid="id" password="pwd"/&amp;gt;&amp;lt;server name="server2" userid="id" password="pwd"/&amp;gt;&amp;lt;/credentials&amp;gt;&amp;lt;/xml&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I put it in the folder %appdata%\SAS\EnterpriseGuide\7.1 and&amp;nbsp;&amp;nbsp;%allusersprofile%\SAS\SharedSettings\7.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run my script powershell&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;############## 
$rep_projet="C:\Users\.............."
$rep_log="C:\Users\.............."

##############   
$eguideApp = New-Object -comObject SASEGObjectModel.Application.7.1
$projName = "$rep_projet\project.egp"
$project = $eguideApp.Open("$projName", "")
$projectLog = $project.ProjectLog

# Show all of the process flows in the project
$pfCollection = $project.ContainerCollection
######################   

Write-Host "Clearing the project log in EG project: " $project 

# Clear the project log:
$projectLog.Clear()

# Other available project log operation examples...

# Enable/disable project log:
$projectLog.Enabled = $true

# Get project log text:
$strProjectLog = $projectLog.Text
Write-Host "Project log text: " $strProjectLog

$pf=$pfCollection.item("DG Hebdo")
Write-Host " EXECUTION FLUX DE PROCESSUS " $pf.Name
# To RUN a process flow, simply use $pf.Run()
$pf.Run()

# Save project log to a file:
$projectLog.SaveAs("$rep_log\Log_proj.txt") 

$project.Close()

$eguideApp.Quit()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following error&amp;nbsp; (see attachment).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isek&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 13:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578695#M34378</guid>
      <dc:creator>isek</dc:creator>
      <dc:date>2019-08-02T13:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: password in powershell to SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578710#M34379</link>
      <description>&lt;P&gt;Those look like the correct steps.&amp;nbsp; You can turn on Application Logging (Tools-&amp;gt;Options) and EG should generate a POWERSHELL*.log file in your profile folder.&amp;nbsp; Some messages in there might indicate what's missing.&amp;nbsp; If you can't solve it, I suggest opening a SAS Tech Support case.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 14:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/password-in-powershell-to-SAS-EG/m-p/578710#M34379</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-08-02T14:13:21Z</dc:date>
    </item>
  </channel>
</rss>

