<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=Storing_PowerShell_results_in_datastore</id>
	<title>Storing PowerShell results in datastore - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=Storing_PowerShell_results_in_datastore"/>
	<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=Storing_PowerShell_results_in_datastore&amp;action=history"/>
	<updated>2026-04-04T02:30:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.smt-x.com/index.php?title=Storing_PowerShell_results_in_datastore&amp;diff=338&amp;oldid=prev</id>
		<title>Smtxwiki: Created page with &quot;This example takes the output of a powershell script and stores it in a datastore. The script returns 3 columns per line (; seperated) and an additional lookup is done in a JS...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=Storing_PowerShell_results_in_datastore&amp;diff=338&amp;oldid=prev"/>
		<updated>2020-10-02T14:14:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This example takes the output of a powershell script and stores it in a datastore. The script returns 3 columns per line (; seperated) and an additional lookup is done in a JS...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This example takes the output of a powershell script and stores it in a datastore. The script returns 3 columns per line (; seperated) and an additional lookup is done in a JSON structure to find a matching key with a given code.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
var textArea=&amp;#039;Name1;email1;BGN\nName2;email2;BGN\nName3;email3;BG-Bau&amp;#039;;&lt;br /&gt;
var lines = textArea.split(&amp;#039;\n&amp;#039;);&lt;br /&gt;
var i=0;&lt;br /&gt;
var lineFields = null;&lt;br /&gt;
var mandantList = {&amp;#039;BG-Bau&amp;#039;: &amp;#039;37&amp;#039;, &amp;#039;BGN&amp;#039; : &amp;#039;18&amp;#039;};&lt;br /&gt;
&lt;br /&gt;
CommonInterface.deleteParameterEntries(&amp;#039;AD Emailgroups&amp;#039;, {&amp;#039;DeleteDummy&amp;#039;:1});&lt;br /&gt;
&lt;br /&gt;
for(i = 0;i &amp;lt; lines.length;i++){&lt;br /&gt;
lineFields = lines[i].split(&amp;#039;;&amp;#039;);&lt;br /&gt;
CommonInterface.addParameterEntry(&amp;#039;AD Emailgroups&amp;#039;, {&amp;#039;Name&amp;#039;: lineFields[0], &amp;#039;Email&amp;#039;: lineFields[1], &amp;#039;Mandant&amp;#039;: lineFields[2], &amp;#039;MandantId&amp;#039; : mandantList[lineFields[2]], &amp;#039;DeleteDummy&amp;#039;: 1});&lt;br /&gt;
}&lt;br /&gt;
return(i+&amp;#039; Datensätze hinzugefügt in datastore AD Emailgroups&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smtxwiki</name></author>
	</entry>
</feed>