<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://powershell.com/cs/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>PowerShell General</title><link>http://powershell.com/cs/forums/230.aspx</link><description>Moderated by PowerShell MVP &lt;a href="http://powershell.com/cs/content/experts.aspx#thomas-lee"&gt;Thomas Lee&lt;/a&gt; and PowerShell expert  &lt;a href="http://powershell.com/cs/content/experts.aspx#jakub-jares"&gt;Jakub Jareš&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Re: Get-QADGroup</title><link>http://powershell.com/cs/forums/thread/16426.aspx</link><pubDate>Mon, 07 May 2012 20:11:48 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16426</guid><dc:creator>Don Jones</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/16426.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=16426</wfw:commentRss><description>&lt;p&gt;Yes, that would have been good to know. I edited my example. You have to understand, though, that I can&amp;#39;t *test* this - I&amp;#39;m not in your environment. So if you&amp;#39;re not getting exactly what you want, you&amp;#39;ll need to teach yourself a bit about what&amp;#39;s going on, and tweak from there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Get-QADGroup</title><link>http://powershell.com/cs/forums/thread/16425.aspx</link><pubDate>Mon, 07 May 2012 20:00:08 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16425</guid><dc:creator>Chris Ngu</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/16425.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=16425</wfw:commentRss><description>&lt;p&gt;I have no idea what just happened. I am sorry, maybe I should have specified that I am new to programming and powershell? I dont want to bother you but giving me an example using something practical would help? like using the example I used? So sorry to bug you with such simple stuff (for you)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Get-QADGroup</title><link>http://powershell.com/cs/forums/thread/16424.aspx</link><pubDate>Mon, 07 May 2012 19:37:10 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16424</guid><dc:creator>Don Jones</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/16424.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=16424</wfw:commentRss><description>&lt;p&gt;Quick and dirty example...&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;function&lt;span&gt; &lt;/span&gt;&lt;span&gt;Split-DN&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;param&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;[string]&lt;span&gt;$dn&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$pieces&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;$dn&lt;span&gt; &lt;/span&gt;&lt;span&gt;-split&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span&gt;$output&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; @{}&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;foreach&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;$piece&lt;span&gt; &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span&gt; &lt;/span&gt;$pieces&lt;span&gt;) {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;$bits&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;$piece&lt;/span&gt; &lt;span&gt;-split&lt;/span&gt; &lt;span&gt;&amp;quot;=&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;$counter&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;while&lt;/span&gt; (&lt;span&gt;$output&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;contains(&lt;span&gt;$bits&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;)) {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;$bits&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt; &lt;span&gt;+=&lt;/span&gt; &lt;span&gt;$counter&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;$counter&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$output&lt;span&gt;.&lt;/span&gt;&lt;span&gt;add(&lt;/span&gt;$bits&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;$bits&lt;span&gt;[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$output&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;$groups =&amp;nbsp;&lt;span&gt;Get-QadGroup -SearchRoot &amp;#39;test.com/Master/Groups/Groups - Secure/Soft&amp;#39; | Sort Name | Select Name, Description, Notes, Managedby,@{label=&amp;#39;cn&amp;#39;;expression={(split-dn $_.name).cn}}&lt;/span&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Get-QADGroup</title><link>http://powershell.com/cs/forums/thread/16423.aspx</link><pubDate>Mon, 07 May 2012 19:30:23 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16423</guid><dc:creator>Don Jones</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/16423.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=16423</wfw:commentRss><description>&lt;p&gt;There&amp;#39;s nothing built-in to do this. The best-performance way would be to use a regular expression to extract the name. You could also play with the string-handling functions of the String object. Like, find the location of the first comma, then grab the fourth character through the position just before the first comma.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternately, you could use that DN to retrieve the actual user object (using Get-QADUser, probably). That object will have a Name property that&amp;#39;s just the name (or FullName, or whatever you&amp;#39;re after).&lt;/p&gt;
&lt;p&gt;Also, there&amp;#39;s no such thing as &amp;quot;CSV file in a table format.&amp;quot; It&amp;#39;s either CSV, or its a textual table. If you want to export to CSV, pipe your output to Export-CSV. If you want a text table, pipe to Format-Table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Get-QADGroup</title><link>http://powershell.com/cs/forums/thread/16421.aspx</link><pubDate>Mon, 07 May 2012 19:18:20 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16421</guid><dc:creator>Chris Ngu</dc:creator><slash:comments>0</slash:comments><comments>http://powershell.com/cs/forums/thread/16421.aspx</comments><wfw:commentRss>http://powershell.com/cs/forums/commentrss.aspx?SectionID=230&amp;PostID=16421</wfw:commentRss><description>&lt;p&gt;I have a script Get-QadGroup -SearchRoot &amp;#39;test.com/Master/Groups/Groups - Secure/Soft&amp;#39; | Sort Name | Select Name, Description, Notes, Managedby &lt;/p&gt;
&lt;p&gt;The problem I have is I am getting the DN for Managed by. How do I make it so it just displays the name of the person who manages the group &amp;quot;John Doe&amp;quot; and not (CN= John Doe ,OU=FL,OU=Users,DC=test,DC=com)&lt;/p&gt;
&lt;p&gt;Also I would like to export this to a csv file in a table format.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you so much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>