<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://trycatch.be/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'powershell' and 'Citrix'</title><link>http://trycatch.be/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=powershell,Citrix&amp;orTags=0</link><description>Search results matching tags 'powershell' and 'Citrix'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008 SP2 (Build: 31104.93)</generator><item><title>[VB.net] Citrix XenApp 6.0 - SDK 6.1.2</title><link>http://trycatch.be/blogs/bps/archive/2010/11/08/vb-net-citrix-xenapp-6-0-sdk-6-1-2.aspx</link><pubDate>Mon, 08 Nov 2010 15:33:00 GMT</pubDate><guid isPermaLink="false">12bbda7a-b33b-4de2-8627-f5e32a6b90ff:2569</guid><dc:creator>Benjamin-Pierre S.</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;I have created an application that can read and do a lot of stuff from the application to a farm in Cirtrix XenApp 6.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But being a vb.net programmer and not a C# one, I didn&amp;#39;t find what I was looking for on the net... so I wrote it myself.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here you got the basic required funtion to connect a vb.net program to the cirtix XenApp SDK (powershell)&lt;/p&gt;
&lt;p&gt;-----------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Private Sub GetCitrixInfo()&lt;/p&gt;
&lt;div class="jive-message-body"&gt;
&lt;br /&gt;
        &amp;#39;Adding the default Runspace to the Form&lt;br /&gt;
        Dim Runspace As Runspace&lt;br /&gt;
        Runspace = CitrixRunspaceFactory.DefaultRunspace&lt;br /&gt;
&lt;br /&gt;
        &amp;#39;Now we have a runespace we need a pipeline (to send and receive objects from PowerShell)&lt;br /&gt;
        Dim Pipeline As Pipeline&lt;br /&gt;
        Pipeline = Runspace.CreatePipeline()&lt;br /&gt;
&lt;br /&gt;
        &amp;#39;Creating the command we want to send&lt;br /&gt;
        &amp;#39;The Name of the Application&lt;br /&gt;
        Dim GetSessionByApplicationsByName As New GetXASessionByApplicationName&lt;br /&gt;
&lt;br /&gt;
        Dim BrowserName As Array&lt;br /&gt;
        BrowserName = {&amp;quot;*&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
        Dim Commando&lt;br /&gt;
        Commando = GetSessionByApplicationsByName.Command&lt;br /&gt;
&lt;br /&gt;
        &amp;#39;Adding the command to the pipeline&lt;br /&gt;
        Pipeline.Commands.Add(Commando)&lt;br /&gt;
&lt;br /&gt;
        &amp;#39;We need to to give a variable which we will use in the Pipe&lt;br /&gt;
&lt;br /&gt;
        Dim results As Collection(Of PSObject)&lt;br /&gt;
        results = Pipeline.Invoke()&lt;br /&gt;
&lt;br /&gt;
        &amp;#39;Now our variable will be filled by PowerShell objects, we need to translate them to .NET object&lt;br /&gt;
&lt;br /&gt;
        Dim app As PSObject&lt;br /&gt;
        Dim allowedUsers As Dictionary(Of String, User)&lt;br /&gt;
&lt;br /&gt;
        For Each app In results&lt;br /&gt;
            &amp;#39;app&amp;#39; is an instance of PSObject&lt;br /&gt;
&lt;br /&gt;
            Dim xaSession As XASession&lt;br /&gt;
            xaSession = app.BaseObject&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    Dim item As New ListViewItem&lt;br /&gt;
                    item.SubItems.Add(xaSession.AccountName)&lt;br /&gt;
                    item.SubItems.Add(xaSession.BrowserName)&lt;br /&gt;
                    item.SubItems.Add(xaSession.ServerName)&lt;br /&gt;
                    item.SubItems.Add(xaSession.SessionId)&lt;br /&gt;
                    item.SubItems.Add(xaSession.ClientName)&lt;br /&gt;
                    SessionListView.Items.Add(item)&lt;br /&gt;
&lt;br /&gt;
                    &lt;br /&gt;
                Catch ex As Exception&lt;br /&gt;
                    &amp;#39;Debugging&lt;br /&gt;
                    &lt;br /&gt;
                End Try&lt;br /&gt;
            End If&lt;br /&gt;
&lt;br /&gt;
        Next&lt;br /&gt;
&lt;p&gt;
        &amp;#39;Autosize Columns in the Listview&lt;br /&gt;
        For Each column As ColumnHeader In Me.SessionListView.Columns&lt;br /&gt;
            column.Width = -2&lt;br /&gt;
        Next&lt;br /&gt;
&lt;br /&gt;
        progressBar.Style = ProgressBarStyle.Blocks&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;If you have more question on the subject, just ask ! :)&lt;/p&gt;
&lt;/div&gt;</description></item><item><title>Managing Citrix Farms Using MFCOM and Powershell</title><link>http://trycatch.be/blogs/scratchthesurface/archive/2008/05/02/managing-citrix-farms-using-mfcom-and-powershell.aspx</link><pubDate>Fri, 02 May 2008 17:23:17 GMT</pubDate><guid isPermaLink="false">12bbda7a-b33b-4de2-8627-f5e32a6b90ff:518</guid><dc:creator>EvilBart</dc:creator><description>&lt;p&gt;I found this &lt;a href="http://bsonposh.com/modules/wordpress/?p=118" target="_blank"&gt;just recorded webinar&lt;/a&gt; on &lt;a href="http://bsonposh.com" target="_blank"&gt;Brandon&amp;#39;s Blog&lt;/a&gt; on managing citrix Farms using Powershell. I think I linked to his blog before. But after watching the above session I think I&amp;#39;m going to automate just some more stuff using Powershell.&lt;br /&gt;&lt;br /&gt;Very impressive session and well explained. Need more sessions like this for people who aren&amp;#39;t full time with their nose in Powershell but need to automate quickly certain tasks...&lt;br /&gt;Interesting to hear that the community is creating cmdlets faster than the provider will :-)&lt;/p&gt; &lt;p&gt;&lt;a href="http://trycatch.be/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/scratchthesurface/image_5F00_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="682" alt="image" src="http://trycatch.be/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/scratchthesurface/image_5F00_thumb.png" width="772" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;//Bart&lt;/p&gt;</description></item></channel></rss>