<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrew Morgan &#187; Edgesight</title>
	<atom:link href="http://andrewmorgan.ie/tag/edgesight/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewmorgan.ie</link>
	<description>Grumpy ramblings</description>
	<lastBuildDate>Fri, 30 Jun 2017 09:24:25 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>Silently installing the Citrix Edgesight ActiveX plugin</title>
		<link>http://andrewmorgan.ie/2012/09/silently-installing-the-citrix-edgesight-activex-plugin/</link>
		<comments>http://andrewmorgan.ie/2012/09/silently-installing-the-citrix-edgesight-activex-plugin/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 11:30:49 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Batch Scripting]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Edgesight]]></category>
		<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2214</guid>
		<description><![CDATA[Just a really quick blog post on how to silently install the reporting agent inside your environment. Log into a server / client without the EdgeSight plugin installed, and browse to the edgesight website. Once logged in, you will receive the usual prompt to install the software: Install the software and ensure it works, then fire up a command prompt and browse down to &#8220;c:windowsdownloaded program files&#8221;. Once in this folder, a DIR will reveal the ActiveX plugin &#8220;csmdbprov.dll&#8221;. Now [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" style="width:67px;height:73px;" src="/wp-content/uploads/2011/11/es-logo.jpg?w=112&amp;h=112&amp;h=112" alt="" width="112" height="112" />Just a really quick blog post on how to silently install the reporting agent inside your environment.</p>
<p>Log into a server / client without the EdgeSight plugin installed, and browse to the edgesight website. Once logged in, you will receive the usual prompt to install the software:</p>
<p><img class="aligncenter size-full wp-image-2216" title="1" src="/wp-content/uploads/2012/08/1.png" alt="" width="464" height="212" /></p>
<p>Install the software and ensure it works, then fire up a command prompt and browse down to &#8220;c:windowsdownloaded program files&#8221;. Once in this folder, a DIR will reveal the ActiveX plugin &#8220;csmdbprov.dll&#8221;.</p>
<p><img class="aligncenter size-full wp-image-2217" title="2" src="/wp-content/uploads/2012/08/2.png" alt="" width="536" height="228" /></p>
<p>Now simply copy this file out to shared storage:</p>
<p><img class="aligncenter" title="3" src="/wp-content/uploads/2012/08/31.png" alt="" width="521" height="45" /></p>
<p>Once done, now its scripting time!</p>
<p>Below are two examples in batch (.bat , .cmd) or PowerShell (.ps1) for achieving this:</p>
<p>(please amend h:csmdbprov.dll to the path you use)</p>
<p><strong>Batch:</strong></p>
<p>[sourcecode language=&#8221;text&#8221;]<br />
copy h:csmdbprov.dll &quot;c:windowsdownloaded program files&quot;<br />
regsvr32 /s &quot;c:windowsdownloaded program files&quot;<br />
[/sourcecode]</p>
<p><strong>Powershell:</strong></p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
if (test-path h:csmdbprov.dll){<br />
	copy-item H:csmdbprov.dll &#8216;C:WindowsDownloaded Program Files&#8217; -Force<br />
	start-process regsvr32 -ArgumentList &quot;/s &quot;&quot;C:WindowsDownloaded Program Filescsmdbprov.dll&quot;&quot;&quot; -wait<br />
}<br />
[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/09/silently-installing-the-citrix-edgesight-activex-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creating hardware based device groups in Citrix Edgesight</title>
		<link>http://andrewmorgan.ie/2012/08/creating-hardware-based-device-groups-in-citrix-edgesight/</link>
		<comments>http://andrewmorgan.ie/2012/08/creating-hardware-based-device-groups-in-citrix-edgesight/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 11:30:36 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Edgesight]]></category>
		<category><![CDATA[Citrix]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2198</guid>
		<description><![CDATA[If you want to organise your hardware into easy to view groups in edgesight, this is the post for you! It can be extremely useful when retiring new hardware, or doing inventory as below: Using your preferential database browsing tool, browse over to the edgesight database and view the contents of the DBO.Box_asset as below, this table will give you a view of the types of hardware on which you can create your reports: Take a note of the Hardware [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" style="width:71px;height:65px;" src="/wp-content/uploads/2011/11/es-logo.jpg?w=112&amp;h=112&amp;h=112" alt="" width="80" height="65" />If you want to organise your hardware into easy to view groups in edgesight, this is the post for you!</p>
<p>It can be extremely useful when retiring new hardware, or doing inventory as below:</p>
<p><a href="/wp-content/uploads/2012/08/report.gif"><img class="aligncenter size-full wp-image-2208" title="report" src="/wp-content/uploads/2012/08/report.gif" alt="" width="600" height="211" /></a></p>
<p>Using your preferential database browsing tool, browse over to the edgesight database and view the contents of the DBO.Box_asset as below, this table will give you a view of the types of hardware on which you can create your reports:</p>
<p><img class="aligncenter size-full wp-image-2199" title="box_asset view" src="/wp-content/uploads/2012/08/box_asset-view.png" alt="" width="600" height="297" /></p>
<p>Take a note of the Hardware types above and lets jump over to edgesight and start creating the groups.</p>
<p>Logged into the EdgeSight console, go to the <strong>configure</strong> tab, <strong>Device management</strong>, <strong>Groups:</strong></p>
<p><img class="aligncenter size-full wp-image-2200" title="configure - groups" src="/wp-content/uploads/2012/08/configure-groups.png" alt="" width="438" height="370" /></p>
<p>Click the <strong>new group </strong>button:</p>
<p><img class="aligncenter size-full wp-image-2201" title="new group" src="/wp-content/uploads/2012/08/new-group.png" alt="" width="493" height="327" /></p>
<p>On the new group tab, configure the relevant names and the options you require, below is an example:</p>
<p><img class="aligncenter size-full wp-image-2202" title="create group first page" src="/wp-content/uploads/2012/08/create-group-first-page.png" alt="" width="523" height="280" /></p>
<p>Once happy with the options, click create group.</p>
<p>On the <strong>Member Type</strong> selection, choose <strong>Queries</strong>.</p>
<p><img class="aligncenter size-full wp-image-2203" title="membertype" src="/wp-content/uploads/2012/08/membertype.gif" alt="" width="513" height="206" /></p>
<p>On the query page, select new query:</p>
<p><a href="/wp-content/uploads/2012/08/new-query.png"><img class="aligncenter size-full wp-image-2204" title="new query" src="/wp-content/uploads/2012/08/new-query.png" alt="" width="506" height="116" /></a></p>
<p>Name the query as you wish then paste the following in below (replacing %query% with the hardware type you have identified above).</p>
<p><em><strong>Note:</strong> a % is the equivalent of a * in sql language.</em></p>
<pre>select i.instid
from instance  as i inner join machine as m on i.machid = m.machid
inner join box_asset as b on b.boxaid = m.boxaid
WHERE b.model LIKE '%query%'</pre>
<p><img class="aligncenter size-full wp-image-2205" title="name query test" src="/wp-content/uploads/2012/08/name-query-test.png" alt="" width="600" height="185" /></p>
<p>Once finished, click the test query button to ensure you have the results you desire in the window as above.</p>
<p>Assuming you are happy with your result, Click <strong>save</strong> <strong>query, Add query </strong>then<strong> next,</strong> then finally<strong> Finish.</strong></p>
<p><strong><img class="aligncenter size-full wp-image-2207" title="save add query" src="/wp-content/uploads/2012/08/save-add-query.png" alt="" width="600" height="212" /></strong></p>
<p>Once complete, browse to Device Management, devices and in the dropdown you&#8217;ll see the newly created groups on which you can run reports.</p>
<p><img class="aligncenter size-full wp-image-2209" title="device management devices group" src="/wp-content/uploads/2012/08/device-management-devices-group.gif" alt="" width="600" height="303" /></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/08/creating-hardware-based-device-groups-in-citrix-edgesight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing Users to Citrix Edgesight User Groups from Active Directory.</title>
		<link>http://andrewmorgan.ie/2011/11/importing-users-to-citrix-edgesight-user-groups-from-active-directory/</link>
		<comments>http://andrewmorgan.ie/2011/11/importing-users-to-citrix-edgesight-user-groups-from-active-directory/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 15:03:25 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Edgesight]]></category>
		<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=1017</guid>
		<description><![CDATA[I&#8217;ve blogged about Edgesight reporting previously, but in this case I needed to populate Edgesight groups from active directory and keep them up to date. This functionality is (rather strangely) not available in Edgesight and for this reason I decided to create a Powershell module to allow for automation of user group population from active directory. Edgesight doesn&#8217;t seem to have any API&#8217;s or command line interfaces to hook into. For this reason my scripts are based on connecting to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2011/11/es-logo.jpg"><img class="alignright  wp-image-1018" title="es-logo" src="/wp-content/uploads/2011/11/es-logo.jpg" alt="" width="112" height="112" /></a>I&#8217;ve blogged about Edgesight reporting previously, but in this case I needed to populate Edgesight groups from active directory and keep them up to date. This functionality is (rather strangely) not available in Edgesight and for this reason I decided to create a Powershell module to allow for automation of user group population from active directory.</p>
<p>Edgesight doesn&#8217;t seem to have any API&#8217;s or command line interfaces to hook into. For this reason my scripts are based on connecting to the Edgesight database and retrieving the information with SQL statements. This presented a really fun challenge for me as I&#8217;m an SQL novice. I learned quite a bit in a short period of time by writing this powershell module.</p>
<p>With the following module you can run scheduled tasks to connect to your edgesight database and add / amend your user groups with ease.</p>
<p><strong>First, some caveats, warnings and limitations of Edgesight you should be aware of:</strong></p>
<ul>
<li>My SQL statements have been tested fully internally and work flawlessly, that being said <strong>Always backup your database before you attempt to use these modules.</strong></li>
<li>Each Edgesight group has a unique GUID assigned when it is created, for this reason <strong>you must manually create the Edgesight groups</strong> before attempting to import users.</li>
<li>Each user has a unique identifier in Edgesight called a PRID, if Edgesight has not seen a user before, the PRID will not exist. As such,<strong> you cannot import a user who has not logged into the environment before</strong>.</li>
</ul>
<p><code><span id="more-1017"></span><br />
</code></p>
<h2>The Module:</h2>
<p><code><br />
</code><br />
I have sealed the necessary commands for this job into a self contained module you can import on runtime.</p>
<p>The module needs to be edited by hand before you first use it. This is to specify the credentials you wish to use to connect to the Edgesight database.  I have included options for trusted connections and SQL account logins. For more information on this read the<strong> Configuring the module</strong> section below.<br />
<code><br />
</code></p>
<h2>Module Components:</h2>
<p><code></code><br />
This module has the following commands embedded to be used as part of your maintenance scripts:</p>
<p><strong>Get-ESGroups</strong></p>
<ul>
<li>Retrieves the name and ID of each Edgesight user group</li>
</ul>
<p><strong>Get-ESGroupMembers</strong></p>
<ul>
<li>Retrieves all members PRID&#8217;s of a specified user group.</li>
</ul>
<p><strong>Add-ESGoupMember</strong></p>
<ul>
<li>Ensures the user isnt already in the group.</li>
<li>Adds a specified user to a specified group.</li>
</ul>
<p><strong>Remove-ESGroupMember</strong></p>
<ul>
<li>Remove a user via their prid from a specified user group.</li>
</ul>
<p><strong>Clear-ESGroupMembers</strong></p>
<ul>
<li>Removes all members from the specified group.</li>
<li>Reports the amount of users removed.</li>
</ul>
<p><strong>Get-ESUserPrid</strong></p>
<ul>
<li>Looks up a user by name (samaccount name / login name) and returns their Prid.</li>
<li>Warns if the user doesn&#8217;t exist.</li>
</ul>
<p><strong>Get-ESUserName</strong></p>
<ul>
<li>Looks up a user by Prid and returns their login name.</li>
<li>Warns if the user doesn&#8217;t exist.</li>
</ul>
<p><code><br />
</code></p>
<h2>Dowloading the module:</h2>
<p><code><br />
</code><br />
You can download the Edgesight Module from my box.net account <a href="http://www.box.com/s/scky79u0e0tdepccyvb4" target="_blank">here</a>. Remember to continue down this blog post to see how to use the modules for your best chance of success.<br />
<code><br />
</code></p>
<h2>Configuring the module:</h2>
<p><code><br />
</code><br />
Once you have downloaded the module, you need to edit it by hand before you first use it. This is to specify the credentials you wish to use to connect to the Edgesight database.</p>
<h3>Configuring the SQL Server and database name:</h3>
<ul>
<li>Change the $SQLServer variable (labeled 1: below) to the sql database server or instance name you wish to connect to.</li>
<li>Change the $SQLDatabase variable (labeled 2: below) to the sql database name you wish to connect to.:</li>
</ul>
<p><code><br />
</code><br />
Below is an example of how this should look:</p>
<p><a href="/wp-content/uploads/2011/11/sqldetails.png"><img class="aligncenter size-full wp-image-1117" title="sqldetails" src="/wp-content/uploads/2011/11/sqldetails.png" alt="" width="568" height="91" /></a><br />
<code><br />
</code></p>
<h3>Configuring the SQL login details:</h3>
<p><code><br />
</code><br />
I have included options for<strong> trusted connections</strong> and <strong>SQL account logins</strong>. Here&#8217;s a brief description of the two options available to you when configuring your authentication for this module:</p>
<ul>
<li>A trusted connection is a connection using your logged in details.</li>
<li>A non trusted connection requires a SQL user account and password with modify rights to the edgesight database.</li>
</ul>
<h4><strong>Using a Trusted connection:</strong></h4>
<ul>
<li>Configure the $SQLTrustedConnection variable as $true</li>
<li>You can then <strong>ignore</strong> or<strong> remove</strong> the $SQLUsername and $SQLpassword variables.</li>
</ul>
<p>An example of how this should appear is below:</p>
<p><a href="/wp-content/uploads/2011/11/trusted.png"><img class="aligncenter size-full wp-image-1119" title="trusted" src="/wp-content/uploads/2011/11/trusted.png" alt="" width="493" height="98" /></a></p>
<h4><strong>Using an untrusted connection:</strong></h4>
<ul>
<li>Configure the $SqlTrustedConnection variable ( labelled below as 1:) as <strong>$false</strong></li>
<li>Configure the $SqlUserName variable as the SQL username labelled below as 2:) with the afforementioned access rights.</li>
<li>Configure the $SQLPassword variable as the SQL user&#8217;s password (labelled below as 3:)</li>
</ul>
<p><strong>Note:</strong> remember to wrap the<strong> username</strong> and <strong>password</strong> in quotes.</p>
<p>An example of how this should appear is below:</p>
<p><a href="/wp-content/uploads/2011/11/untrusted.png"><img class="aligncenter size-full wp-image-1118" title="untrusted" src="/wp-content/uploads/2011/11/untrusted.png" alt="" width="362" height="96" /></a></p>
<p>Once you&#8217;ve configured the Module to suit your environment, simply save it.<br />
<code><br />
</code></p>
<h2>Importing the Module:</h2>
<p><code><br />
</code><br />
Once you&#8217;ve modified to module to suit yourselves, its time to import the module and see if you&#8217;ve configured it correctly.</p>
<p>I suggest you change  your executionpolicy to unrestricted with the following command first to remove any overzealous security warnings:</p>
<pre>set-executionpolicy unrestricted</pre>
<p>Now, open a powershell window and run the following command: <em>(where c: is the location of the module)</em><br />
<code><br />
</code></p>
<pre>import-module C:Citrix.Edgesight.Cmdlets.psm1</pre>
<p><code><br />
</code><br />
<a href="/wp-content/uploads/2011/11/importmodule.png"><img class="aligncenter size-full wp-image-1120" title="importmodule" src="/wp-content/uploads/2011/11/importmodule.png" alt="" width="497" height="61" /></a></p>
<p><em></em>The module will either error out telling you that the details are incorrect as below:</p>
<p><a href="/wp-content/uploads/2011/11/failed.png"><img class="aligncenter size-full wp-image-1123" title="failed" src="/wp-content/uploads/2011/11/failed.png" alt="" width="600" height="75" /></a></p>
<p>Or confirm a database connection has been established:</p>
<p><a href="/wp-content/uploads/2011/11/success.png"><img class="aligncenter size-full wp-image-1122" title="success" src="/wp-content/uploads/2011/11/success.png" alt="" width="558" height="116" /></a></p>
<p>If the module imported correctly, try one of my powershell functions to see if you can retrieve information.</p>
<p>For example, try:</p>
<pre>get-esgroups</pre>
<p><code><br />
</code><br />
<a href="/wp-content/uploads/2011/11/get-esgroups.png"><img class="aligncenter size-full wp-image-1124" title="get-esgroups" src="/wp-content/uploads/2011/11/get-esgroups.png" alt="" width="600" height="60" /></a><br />
<code><br />
</code></p>
<h2>Adding and removing users from groups:</h2>
<p><code><br />
</code><br />
Once we have the module imported, now we can get to the important task of modifying the memberships of edgesight  groups. Lets do this manually once so we understand the process for active directory imports later.</p>
<p><strong>1: </strong>To retrieve an Edgesight user Group&#8217;s group ID, run the following command:</p>
<pre>get-esgroups</pre>
<p><code><br />
</code></p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/get-esgroups1.png"><img class="aligncenter size-full wp-image-1128" title="get-esgroups1" src="/wp-content/uploads/2011/11/get-esgroups1.png" alt="" width="600" height="86" /></a><em>For this article, we&#8217;ll assume we want to add users to &#8220;All Access Gateway Users&#8221;, so the groupid is 11.</em></p>
<p><strong>2: </strong>To clear the group, we can use the following command:</p>
<pre>Clear-ESgroupmembers -GroupID 11</pre>
<p><code><br />
</code></p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/clear-esgroupmembers.png"><img class="aligncenter size-full wp-image-1129" title="Clear-esgroupmembers" src="/wp-content/uploads/2011/11/clear-esgroupmembers.png" alt="" width="276" height="41" /></a><em>The command should return the amount of deleted users</em></p>
<p><code><br />
</code><br />
<strong>3:</strong> Because we need the Edgesight user&#8217;s PRID to add the member to the group, we can achieve that by running the following command: (where &#8220;user&#8221; is the users name is the login name)</p>
<pre>Get-ESUserPrid username</pre>
<p><code><br />
</code></p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/get-esuserprid.png"><img class="aligncenter size-full wp-image-1130" title="get-esuserprid" src="/wp-content/uploads/2011/11/get-esuserprid.png" alt="" width="255" height="33" /></a><em>I&#8217;ve omitted the username for privacy reasons.</em></p>
<p><code><br />
</code><br />
<strong>4:</strong> Once we have the PRID we can now add the user to the group:</p>
<pre>add-esgroupmember -GroupID 11 -Prid 26</pre>
<p><code><br />
</code></p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/add-esgroupmember.png"><img class="aligncenter size-full wp-image-1131" title="add-esgroupmember" src="/wp-content/uploads/2011/11/add-esgroupmember.png" alt="" width="406" height="14" /></a><em>If this returns no error, this has completed successfully</em></p>
<p><code><br />
</code><br />
<strong>5:</strong> To confirm this user is now in the correct group, try:</p>
<pre>get-esgroupmembers -GroupID 11</pre>
<p><code><br />
</code></p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/get-esgroupmembers1.png"><img class="aligncenter size-full wp-image-1133" title="get-esgroupmembers" src="/wp-content/uploads/2011/11/get-esgroupmembers1.png" alt="" width="600" height="99" /></a><em>You should see you user added as above.</em></p>
<p><code><br />
</code><br />
You can also check this in Edgesight by reviewing the group details:</p>
<p style="text-align:center;"><a href="/wp-content/uploads/2011/11/edgesight-confirm.png"><img class="aligncenter size-full wp-image-1134" title="edgesight confirm" src="/wp-content/uploads/2011/11/edgesight-confirm.png" alt="" width="402" height="125" /></a><em>I&#8217;ve omitted the username for privacy reasons.</em></p>
<p><code><br />
</code><br />
So now that we know a single user import works, lets try an active directory import.<br />
<code><br />
</code></p>
<h2>Importing from Active Directory:</h2>
<p>you will need the following items for this task:</p>
<ul>
<li>a Powershell module or snapin for listing members of groups. *</li>
<li>The active directory name group.</li>
<li>The GroupID you wish to add the users to.</li>
</ul>
<p>The basic concept behind this task, is to clear the current group then repopulate it with users from AD. Above I&#8217;ve walked you through one user, so now you understand the concept and can modify the script to import in bulk safe in the knowledge you know what is happening.</p>
<p>Now that you understand the process, its just a matter of using a powershell snapin or module to list active directory users and import them one by one.</p>
<p>Below you will find two examples using the quest and microsoft tools. These are fairly basic examples as each persons needs are different, the module is robust and flexible enough for you to script your own solution using these modules and I&#8217;ll happily help if you have a specific requirement not covered by these basic examples.</p>
<p><em>*In reference to the powershell module, they are numerous and available online, for the sake of completeness I&#8217;ve included the Quest tools &amp; the Microsoft ActiveDirectory module below for reference.</em><br />
<code><br />
</code></p>
<h5>Quest Active Directory Snapin:<code></code></h5>
<p>Below you will find an example on how to use the Quest active directory snapin for powershell to retrieve users from the group &#8220;<strong>Active directory user group</strong>&#8221; and populate the Edgesight user group <strong>20</strong> with these members.</p>
<p>For convenience, you can download this <a href="http://www.box.com/s/ji14lngj1fzj6cafl08r" target="_blank">here:</a></p>
<p>[sourcecode language=&#8221;PowerShell&#8221;]<br />
import-module &quot;C:citrix.edgesight.cmdlets.psm1&quot;<br />
add-pssnapin Quest.ActiveRoles.ADManagement<br />
$group=&quot;Active Directory User Group&quot;<br />
$esgroupid=20</p>
<p>#clear the group before import<br />
clear-esgroupmembers -groupid $esgroupid</p>
<p>#get users from group, then import them into edgesight<br />
foreach ($user in Get-QADGroupMember $group -type user -indirect -sizelimit 0){<br />
    $prid = get-ESUserPrid $user.logonname<br />
    if ($prid -NE $null){<br />
    Add-ESGroupMember -groupid $ESgroupid -prid $prid<br />
    }<br />
}#end For<br />
[/sourcecode]</p>
<p><code><br />
</code></p>
<h5>Microsoft ActiveDirectory Powershell module:<code></code></h5>
<p>Below you will find an example on how to use the Microsoft ActiveDirectory module for powershell to retrieve users from the group &#8220;<strong>Active directory user group</strong>&#8221; and populate the Edgesight user group <strong>20</strong> with these members.</p>
<p>For convenience, you can download this <a href="http://www.box.com/s/b01ecr7frnsjgsnmpm88" target="_blank">here:</a></p>
<p>[sourcecode language=&#8221;PowerShell&#8221;]<br />
import-module &quot;C:citrix.edgesight.cmdlets.psm1&quot;<br />
import-module activedirectory<br />
$group=&quot;Active Directory User Group&quot;<br />
$esgroupid=20</p>
<p>#clear the group before import<br />
clear-esgroupmembers -groupid $esgroupid</p>
<p>#get users from group, then import them into edgesight<br />
foreach ($user in Get-ADGroupMember $group -recursive){<br />
    $prid = get-ESUserPrid $user.samaccountname<br />
    if ($prid -NE $null){<br />
        Add-ESGroupMember -groupid $ESgroupid -prid $prid<br />
    }<br />
}#end For<br />
[/sourcecode]</p>
<h2>Keeping your groups up to date:</h2>
<p>Once you are happy that you have gotten the code to work for your environment, you can simply run these scripts as scheduled tasks and the groups will be cleared and repopulated when the scheduled task runs.</p>
<p>It&#8217;s that simple.</p>
<p><code><br />
</code></p>
<h2>Getting further help with these modules:</h2>
<p><code><br />
</code><br />
Once the module is imported, you can retrieve help on any of these commands by running &#8220;get-help (command)&#8221;, where command is the command you wish to retrieve help from.</p>
<p>I&#8217;m also quite happy to support and expand this module is necessary as I really enjoyed this project. Drop me a comment or email: andrew (at) andrewmorgan (dot) ie and I&#8217;ll see if I can help you with this.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2011/11/importing-users-to-citrix-edgesight-user-groups-from-active-directory/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Report Access Gateway connections using Citrix Edgesight, based on user groups.</title>
		<link>http://andrewmorgan.ie/2011/11/report-access-gateway-connections-using-citrix-edgesight-based-on-user-groups/</link>
		<comments>http://andrewmorgan.ie/2011/11/report-access-gateway-connections-using-citrix-edgesight-based-on-user-groups/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 15:04:39 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Edgesight]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=1020</guid>
		<description><![CDATA[I&#8217;ve covered this topic before, and with my previous solution you had the ability to report all access gateway connections natively through edgesight with ease. Recently though, as a service provider our customers have started requesting their own reports on user login details. With the request in hand, I went back to the drawing board and attempted to Re-Engineer this task with limited success. In the end the quickest solution I found was to simply modify the &#8220;Session Details for [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2011/11/es-logo.jpg"><img class="alignright  wp-image-1018" title="es-logo" src="/wp-content/uploads/2011/11/es-logo.jpg" alt="" width="102" height="102" /></a>I&#8217;ve covered this topic<a href="http://andrewmorgan.ie/2011/03/07/using-citrix-edgesight-to-report-access-gateway-logins/" target="_blank"> before</a>, and with my previous solution you had the ability to report all access gateway connections natively through edgesight with ease. Recently though, as a service provider our customers have started requesting their own reports on user login details.</p>
<p>With the request in hand, I went back to the drawing board and attempted to Re-Engineer this task with limited success. In the end the quickest solution I found was to simply modify the &#8220;Session Details for a User Group&#8221; report to include the query I covered in my previous copy.</p>
<p>This wasn&#8217;t without peril, many of the labels will cease to work when you re-upload your report, so there was quite a bit of manual intervention to make the report pretty again.</p>
<p>I do intend to follow up with a powershell script to help populate Edgesight user groups from active directory. Check back later or follow me on <a href="https://twitter.com/#!/andyjmorgan/" target="_blank">twitter</a> for updates.</p>
<p>I&#8217;ve shared this report file below for anyone to use and below you will find the steps to take in order to complete this task.</p>
<p><strong>Note</strong>: Ensure you have configured your Access Gateway Web Interfaces to differenciate access gateways connections, I covered this before <a href="http://andrewmorgan.ie/2011/03/07/using-citrix-edgesight-to-report-access-gateway-logins/" target="_blank">here</a>:</p>
<p>1: Download the file <a href="http://www.box.com/s/ic3xkgruim06y7ao6yqb" target="_blank">here</a> from box.net and place it somewhere you can easily access from your browser:</p>
<p>2: Open your browser and login to your edgesight instance:</p>
<p><img class="aligncenter size-full wp-image-1021" title="1-login" src="/wp-content/uploads/2011/11/1-login.png" alt="" width="600" height="206" /></p>
<p>3: Once logged in, choose the <strong>Configure </strong>tab:</p>
<p><img class="aligncenter size-full wp-image-1022" title="2 - Configure" src="/wp-content/uploads/2011/11/2-configure.png" alt="" width="569" height="125" /></p>
<p>4: From the left hand menu, Choose <strong>Custom Reports</strong>:</p>
<p><img class="aligncenter size-full wp-image-1023" title="3 - Custom Reports" src="/wp-content/uploads/2011/11/3-custom-reports.png" alt="" width="270" height="191" /></p>
<p>5: Choose <strong>Upload a Report</strong>:</p>
<p><img class="aligncenter size-full wp-image-1024" title="4 - Upload a report" src="/wp-content/uploads/2011/11/4-upload-a-report.png" alt="" width="600" height="181" /></p>
<p>6: Browse to your file, then fill in the details as below, Click<strong> Upload</strong>:</p>
<p><img class="aligncenter  wp-image-1025" title="5 - browse and details" src="/wp-content/uploads/2011/11/5-browse-and-details.png" alt="" width="581" height="449" /></p>
<p>7: Confirm your new report has been uploaded, then <strong>click the report</strong> to do a test run:</p>
<p><img class="aligncenter size-full wp-image-1026" title="6 - Confirm created" src="/wp-content/uploads/2011/11/6-confirm-created.png" alt="" width="600" height="108" /></p>
<p>&nbsp;</p>
<p>Select your Desired values, then click <strong>Go</strong>:</p>
<p><img class="aligncenter size-full wp-image-1036" title="7 - test run" src="/wp-content/uploads/2011/11/7-test-run.png" alt="" width="600" height="139" /></p>
<p>&nbsp;</p>
<p>the output show appear as below (account details have been omitted):</p>
<p>&nbsp;</p>
<p><a href="/wp-content/uploads/2011/11/8-result.png"><img class="aligncenter size-full wp-image-1027" title="8 - Result" src="/wp-content/uploads/2011/11/8-result.png" alt="" width="600" height="421" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2011/11/report-access-gateway-connections-using-citrix-edgesight-based-on-user-groups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Citrix Edgesight to report Access Gateway logins.</title>
		<link>http://andrewmorgan.ie/2011/03/using-citrix-edgesight-to-report-access-gateway-logins/</link>
		<comments>http://andrewmorgan.ie/2011/03/using-citrix-edgesight-to-report-access-gateway-logins/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 23:13:23 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Edgesight]]></category>
		<category><![CDATA[Access Gateway]]></category>

		<guid isPermaLink="false">http://andymorgan.wordpress.com/?p=353</guid>
		<description><![CDATA[Edgesight has at best some mediocre reports. The reports seem really useful at first glance, but when you are after a specific set of data it can be hard to come by. Below is a step by step guide to reporting external connections into your Citrix environment. First, we need to uniquely identify users as they come through the access gateway. To do this we change the web interface site to tag workstation names differently for access gateway connections. Log [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="text-align:left;"><img class="alignright" src="/wp-content/uploads/2009/01/ctxapp13.png?w=96&amp;h=96&amp;h=96" alt="" width="96" height="96" />Edgesight has at best some mediocre reports. The reports seem really useful at first glance, but when you are after a specific set of data it can be hard to come by. Below is a step by step guide to reporting external connections into your Citrix environment.</p>
<p style="text-align:left;">First, we need to uniquely identify users as they come through the access gateway. To do this we change the web interface site to tag workstation names differently for access gateway connections.</p>
<p>Log into your web interface and Identify the site used for your access gateway.</p>
<p><a href="/wp-content/uploads/2011/03/wis.jpg"><img class="size-full wp-image-355 aligncenter" title="wi's" src="/wp-content/uploads/2011/03/wis.jpg" alt="" width="349" height="94" /></a></p>
<ul>
<li>For Web Interface 4.5 and 4.6
<ul>
<li>edit the session.aspxf file located in the <strong>C:inetpubwwwrootCitrix<em>&lt;site name&gt;</em>app_datasiteserverscripts</strong> folder.</li>
</ul>
</li>
<li>For Web Interface 5.0
<ul>
<li>edit the SessionUtils.java file located in the <strong>C:inetpubwwwrootCitrix<em>&lt;site name&gt;</em>app_code<em>PagesJavacomcitrixwipageutils</em></strong> folder.</li>
</ul>
</li>
<li>In either case, change the following line</li>
</ul>
<pre><strong>From:</strong> deviceInfo.setClientName(clientName);
<strong>To:</strong> deviceInfo.setClientName(clientName.Replace("WI_","AG_"));</pre>
<p><strong><a href="/wp-content/uploads/2011/03/ag_.jpg"><img title="ag_" src="/wp-content/uploads/2011/03/ag_.jpg" alt="" width="573" height="160" /></a></strong></p>
<p>Note: The length of the client name must remain the same. For example, <strong>WEB0</strong> cannot be substituted for <strong>WI_</strong></p>
<p>Now that your users will be uniquely identified with their client name starting with AG_, time to move to edgesight and write your custom user group:</p>
<p>Open the Edgesight client, and browse to user configuration:</p>
<p><a href="/wp-content/uploads/2011/03/browse.jpg"><img class="size-full wp-image-357 aligncenter" title="browse" src="/wp-content/uploads/2011/03/browse.jpg" alt="" width="434" height="103" /></a></p>
<p>Select user groups from the left hand menu</p>
<p><a href="/wp-content/uploads/2011/03/usergroups.jpg"><img class="size-full wp-image-358 aligncenter" title="usergroups" src="/wp-content/uploads/2011/03/usergroups.jpg" alt="" width="242" height="274" /></a></p>
<p>Select new user group</p>
<p><a href="/wp-content/uploads/2011/03/newusergroup1.jpg"><img class="size-full wp-image-360 aligncenter" title="newusergroup" src="/wp-content/uploads/2011/03/newusergroup1.jpg" alt="" width="208" height="105" /></a></p>
<p>Name the user group something relevant e.g. Access gateway users, and press &#8220;Create user group&#8221;.</p>
<p><a href="/wp-content/uploads/2011/03/createusergroup.jpg"><img class="size-full wp-image-361 aligncenter" title="createusergroup" src="/wp-content/uploads/2011/03/createusergroup.jpg" alt="" width="532" height="239" /></a></p>
<p>Select Queries and choose next</p>
<p><a href="/wp-content/uploads/2011/03/queries.jpg"><img class="size-full wp-image-362 aligncenter" title="queries" src="/wp-content/uploads/2011/03/queries.jpg" alt="" width="330" height="58" /></a></p>
<p>again, give the query a relevant name, and enter the following in the query:</p>
<pre><em>Select sessid from vw_es_usergroup_ica_users where client_name like "ag_%"</em></pre>
<p><a href="/wp-content/uploads/2011/03/accessgusers.jpg"><img title="accessgusers" src="/wp-content/uploads/2011/03/accessgusers.jpg" alt="" width="328" height="193" /></a></p>
<p>Save the query, then click back, then next again.</p>
<p>Choose the new query you have created from the list, then choose Add query below.</p>
<p><a href="/wp-content/uploads/2011/03/addquery.jpg"><img class="size-full wp-image-364 aligncenter" title="addquery" src="/wp-content/uploads/2011/03/addquery.jpg" alt="" width="274" height="93" /></a></p>
<p>Now select Finish.</p>
<p><strong>Now we wait until the next data upload occurs</strong>. This is configured in your agent properties&#8230;</p>
<p>Once the data upload has occured, move to the Browse tab in edgesight</p>
<p><a href="/wp-content/uploads/2011/03/browse1.jpg"><img title="browse" src="/wp-content/uploads/2011/03/browse1.jpg" alt="" width="434" height="103" /></a></p>
<p>Find the report near the bottom called &#8220;user login details for a user group&#8221;</p>
<p><a href="/wp-content/uploads/2011/03/userlogondetails.jpg"><img class="size-full wp-image-367 aligncenter" title="Userlogondetails" src="/wp-content/uploads/2011/03/userlogondetails.jpg" alt="" width="484" height="71" /></a></p>
<p>Select the user group you specified from the user group dropdown, then choose Group by <strong>Date</strong>, then by <strong>user</strong> then by <strong>all.</strong></p>
<p><strong><a href="/wp-content/uploads/2011/03/accessgatewayusersgo.jpg"><img class="size-full wp-image-368 aligncenter" title="accessgatewayusersgo" src="/wp-content/uploads/2011/03/accessgatewayusersgo.jpg" alt="" width="600" height="104" /></a> </strong></p>
<p>you should now get a meaningful report on access gateway connections:</p>
<p><a href="/wp-content/uploads/2011/03/finished-report.jpg"><img class="size-full wp-image-369 aligncenter" title="finished report" src="/wp-content/uploads/2011/03/finished-report.jpg" alt="" width="600" height="267" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2011/03/using-citrix-edgesight-to-report-access-gateway-logins/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
