<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TenBrink Tech</title>
	
	<link>http://tenbrink.us</link>
	<description>Technology | Life</description>
	<pubDate>Wed, 14 Jan 2009 20:19:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<geo:lat>45.481342</geo:lat><geo:long>-122.408565</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TenBrinkTech" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/TenBrinkTech" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FTenBrinkTech" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>From Scripts to Modules</title>
		<link>http://feedproxy.google.com/~r/TenBrinkTech/~3/DVhY8u-n9gw/</link>
		<comments>http://tenbrink.us/index.php/2009/01/14/from-scripts-to-modules/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 20:19:52 +0000</pubDate>
		<dc:creator>dillon</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Work Experience]]></category>

		<category><![CDATA[powershellv2]]></category>

		<guid isPermaLink="false">http://tenbrink.us/index.php/2009/01/14/from-scripts-to-modules/</guid>
		<description><![CDATA[When I wrote my post on the PowerShell Audit Reports, it caught the attention of Thomas Lee who decided to take them up and package them into a PowerShell v2 module.
The output of his work is shown on his blog and I think it provides a very nice example for getting from a script repository [...]]]></description>
			<content:encoded><![CDATA[<p>When I wrote my post on the <a href="http://tenbrink.us/index.php/2009/01/03/powershelling-audit-reports/">PowerShell Audit Reports</a>, it caught the attention of <a href="http://tfl09.blogspot.com/">Thomas Lee</a> who decided to take them up and package them into a PowerShell v2 module.</p>
<p>The output of his work is <a href="http://tfl09.blogspot.com/2009/01/powershell-audit-reports-turning-great.html">shown on his blog</a> and I think it provides a very nice example for getting from a script repository to a distributable module. I could definitely see the value of this as many of the scripts I use today I share with my coworkers. This would allow me to “package” together these scripts into releases to be distributed.</p>
<p>Good stuff.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TenBrinkTech?a=DVhY8u-n9gw:aSb6rdePKNM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TenBrinkTech?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TenBrinkTech/~4/DVhY8u-n9gw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tenbrink.us/index.php/2009/01/14/from-scripts-to-modules/feed/</wfw:commentRss>
		<feedburner:origLink>http://tenbrink.us/index.php/2009/01/14/from-scripts-to-modules/</feedburner:origLink></item>
		<item>
		<title>PowerShelling Audit Reports</title>
		<link>http://feedproxy.google.com/~r/TenBrinkTech/~3/RUDf1Fx3_h8/</link>
		<comments>http://tenbrink.us/index.php/2009/01/03/powershelling-audit-reports/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 02:49:14 +0000</pubDate>
		<dc:creator>dillon</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Work Experience]]></category>

		<category><![CDATA[audit]]></category>

		<category><![CDATA[powershellv2]]></category>

		<category><![CDATA[quest]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://tenbrink.us/index.php/2009/01/03/powershelling-audit-reports/</guid>
		<description><![CDATA[Part of working in corporate IT is the necessity to create and demonstrate compliance with general computing controls. In my environment part of those controls consist of creating exports of the membership of certain Active Directory groups. Since I am a fan of automation I put together some PowerShell scripts to speed up this task [...]]]></description>
			<content:encoded><![CDATA[<p>Part of working in corporate IT is the necessity to create and demonstrate compliance with general computing controls. In my environment part of those controls consist of creating exports of the membership of certain Active Directory groups. Since I am a fan of automation I put together some PowerShell scripts to speed up this task but it also comes in handy for those one-off “Who is in such-and-such group?” requests.</p>
<p>First, you’ll need two requirements.</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=C913AEAB-D7B4-4BB1-A958-EE6D7FE307BC&amp;displaylang=en">PowerShell 2.0 CTP</a> (I use the convertto-csv cmdlet that does not exist in PSv1. I suppose I could write a routine to do the conversion – but why when 2.0 is coming along nicely?) </li>
<li><a href="http://www.quest.com/powershell/activeroles-server.aspx">Quest ActiveRoles AD Cmdlets</a> (Once again, I could write the whole thing using System.DirectoryServices, but why when the heavy lifting has been done for you?) </li>
</ul>
<p>With that out of the way, the routine consists of three different scripts. First, the workhorse of the routine, <strong>Get-RecursiveGroupMembership.ps1</strong>:</p>
<blockquote><p>param (      <br />&#160;&#160;&#160; [string] $distinguishedname,       <br />&#160;&#160;&#160; [bool] $addOtherTypes = $false       <br />&#160;&#160;&#160; )       <br />$members = @() </p>
<p>$this = (Get-QADGroup $distinguishedname).member | Get-QADObject      <br />$this | foreach {       <br />&#160;&#160;&#160; if ($_.type -eq &#8216;user&#8217;) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $members += $_       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160; elseif ($_.type -eq &#8216;group&#8217;) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host &quot;Adding sub group $_&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $members += .\Get-RecursiveGroupMembership.ps1 $_.dn $addOtherTypes       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160; else {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($addOtherTypes -eq $true) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $members += $_       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host &quot;Non user/group member detected. Not added. Use -addOtherTypes flag to add.&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160; }       <br />}       <br />return $members</p>
</blockquote>
<p>This script is very handy for a lot of things and gives me more power for recursive membership listing than the Get-QADGroupMember cmdlet alone. The other thing that the Get-QADGroupMember cmdlet falls short on is enumerating membership when the group is in another domain – a common occurrence in my environment – hence the use of QADObject and then reading the members attribute.</p>
<p>You will also see the switch. By default the script returns only user objects. You can throw the second parameter (the $addOtherTypes) to true to get all object types.</p>
<p>Future functionality for this script could include a parameter for specifying types to return.</p>
<p>On to the second script, <strong>Audit-QuickGroup.ps1</strong>, which allows me to pass the distinguishedName of a group in any domain and have the results of that group membership written to a csv file of the same name. This script relies on the first.</p>
<blockquote><p>param ([string] $name)      <br />$csvdata = .\Get-RecursiveGroupMembership.ps1 $name | select name,type,dn,title,office,description | convertto-csv -NoTypeInformation       <br />$filename = $name + &quot;.csv&quot;       <br />[String]$reportdate = &quot;Report Generated: &quot; + [datetime]::Now       <br />$f = new-item -itemtype file $filename       <br />add-content $f &quot;Audit Report - Active Directory Group - $name&quot;       <br />add-content $f $reportdate       <br />add-content $f $csvdata</p>
</blockquote>
<p>This script is pretty simple, taking the output, selecting my most commonly requested attributes, and writing it to a csv file with some header information. Future functionality may include the ability to specify an output filename (optional) and including the header or not.</p>
<p>Lastly, for bulk operations, I needed a way to use the filtering abilities of the Quest Get-QADGroup cmdlet to do the export of multiple groups, written to multiple files with one command. Sure, I could have used a little “Get-QADGroup blah –filter moreblah | foreach { loop previous script }”, but why do that when I can do this in my <strong>Audit-MultipleGroups.ps1</strong> script? </p>
<blockquote><p># take group input      <br />param ([string] $GroupInput) </p>
<p>#get groups      <br />$GroupList = get-qadgroup $groupinput </p>
<p># iterate through groups, creating output      <br />foreach ($Group in $GroupList) {       <br />&#160;&#160;&#160; Write-Host $group.dn       <br />&#160;&#160;&#160; $GroupMembers = .\Get-RecursiveGroupMembership.ps1 $group.DN | select name,type,dn,title,office,description | convertto-csv -NoTypeInformation       <br />&#160;&#160;&#160; #now create file       <br />&#160;&#160;&#160; $filename = $Group.Name + &quot;.csv&quot;       <br />&#160;&#160;&#160; [String]$reportdate = &quot;Report Generated: &quot; + [datetime]::Now       <br />&#160;&#160;&#160; $file = New-Item -ItemType file $filename -Force       <br />&#160;&#160;&#160; Add-Content $file &quot;Audit Report - Active Directory Group Membership&quot;       <br />&#160;&#160;&#160; Add-Content $file $reportDate       <br />&#160;&#160;&#160; Add-Content $file $groupMembers       <br />&#160;&#160;&#160; }</p>
</blockquote>
<p>With the swipe of one command, like:</p>
<blockquote><p>PS&gt; .\Audit-MultopleGroups.ps1 SEC_ADM_*</p>
</blockquote>
<p>Provided you have a good Active Directory group naming policy this can output all of the groups matching that prefix into their own csv files with one little command.</p>
<p>So there you go. A very useful base script, a more customer-focused output script, and a purpose-built script all reducing the amount of work necessary to report on group membership in Active Directory. There is one last scenario to deal with in my environment, local computer group membership. The script below will take the computer name and group name as parameters and output the members into a text file. I’ve called it <strong>Audit-LocalGroupMembership.ps1</strong>.</p>
<blockquote><p>#local group member enumeration      <br />param (       <br />&#160;&#160;&#160; [string] $Server,       <br />&#160;&#160;&#160; [string] $GroupName       <br />)       <br />$MemberNames = @()       <br />$Group= [ADSI]&quot;WinNT://$Server/$GroupName,group&quot;       <br />$Members = @($Group.psbase.Invoke(&quot;Members&quot;))       <br />$Members | ForEach-Object {$MemberNames += $_.GetType().InvokeMember(&quot;Name&quot;, &#8216;GetProperty&#8217;, $null, $_, $null)} </p>
<p>#file routine      <br />$filename = $server + &quot; &quot; + $GroupName + &quot;.txt&quot;       <br />$f = New-Item -ItemType file $filename       <br />[string]$reportdate = &quot;Date: &quot; + (Get-Date).tostring(&#8217;yyyyMMdd&#8217;)       <br />Add-Content $f &quot;Local Group Membership Report&quot;       <br />Add-Content $f &quot;Server: $server&quot;       <br />Add-Content $f &quot;Group : $groupname&quot;       <br />Add-Content $f $reportdate       <br />Add-Content $f $membernames       <br />return $membernames</p>
</blockquote>
<p>Happy New Year and happy PowerShelling!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TenBrinkTech?a=RUDf1Fx3_h8:ynfPkCS8XfU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TenBrinkTech?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TenBrinkTech/~4/RUDf1Fx3_h8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tenbrink.us/index.php/2009/01/03/powershelling-audit-reports/feed/</wfw:commentRss>
		<feedburner:origLink>http://tenbrink.us/index.php/2009/01/03/powershelling-audit-reports/</feedburner:origLink></item>
		<item>
		<title>Group Policy Management Console and RSAT</title>
		<link>http://feedproxy.google.com/~r/TenBrinkTech/~3/f0mGlFhVU4w/</link>
		<comments>http://tenbrink.us/index.php/2008/12/30/group-policy-management-console-and-rsat/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 23:38:41 +0000</pubDate>
		<dc:creator>dillon</dc:creator>
		
		<category><![CDATA[Office]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[Windows Server]]></category>

		<category><![CDATA[Work Experience]]></category>

		<guid isPermaLink="false">http://tenbrink.us/index.php/2008/12/30/group-policy-management-console-and-rsat/</guid>
		<description><![CDATA[I suppose I could have expanded the title, but then it would cramp the page.  
Today’s scenario. Co-worker running vista, installs the Remote Server Administration Tools package, pops into the Administrative Tools folder and cannot find the Group Policy Management Console.
The solution? The GPMC is disabled by default after installing RSAT. You need to [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose I could have expanded the title, but then it would cramp the page. <img src='http://tenbrink.us/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Today’s scenario. Co-worker running vista, installs the <a href="https://www.microsoft.com/downloads/details.aspx?FamilyId=9FF6E897-23CE-4A36-B7FC-D52065DE9960&amp;displaylang=en">Remote Server Administration Tools</a> package, pops into the Administrative Tools folder and cannot find the <a href="http://technet.microsoft.com/en-us/windowsserver/grouppolicy/default.aspx">Group Policy Management Console</a>.<a href="http://tenbrink.us/wp-content/uploads/2008/12/image.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://tenbrink.us/wp-content/uploads/2008/12/image-thumb.png" width="216" height="244" /></a></p>
<p>The solution? The GPMC is disabled by default after installing RSAT. You need to visit Programs and Features in the Control Panel, and then click on the Turn Windows features on or off link to bring up what used to be called Windows Components. From that dialog, you can scroll down to find the Remote Server Administration Tools node and click the checkbox for each admin tool you need access to. </p>
<p>While you are in there, enable the telnet client. Been asked before where telnet disappeared to in Vista. It’s there, just not on by default. </p>
<p>For more information on the RSAT, visit <a href="http://support.microsoft.com/kb/941314">KB 941314</a>. It describes the tools and limitations of RSAT. Also, RSAT does not include the Hyper-V manager console. That can be downloaded with <a href="https://www.microsoft.com/downloads/details.aspx?familyid=88208468-0AD6-47DE-8580-085CBA42C0C2&amp;displaylang=en">this link</a> and more information is available in <a href="http://support.microsoft.com/kb/952627">KB 952627</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TenBrinkTech?a=f0mGlFhVU4w:y0lTEZ4G_O0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TenBrinkTech?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TenBrinkTech/~4/f0mGlFhVU4w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tenbrink.us/index.php/2008/12/30/group-policy-management-console-and-rsat/feed/</wfw:commentRss>
		<feedburner:origLink>http://tenbrink.us/index.php/2008/12/30/group-policy-management-console-and-rsat/</feedburner:origLink></item>
		<item>
		<title>Exchange API Roadmap</title>
		<link>http://feedproxy.google.com/~r/TenBrinkTech/~3/GvxYuYi4OXI/</link>
		<comments>http://tenbrink.us/index.php/2008/06/17/exchange-api-roadmap/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 15:43:00 +0000</pubDate>
		<dc:creator>dillon</dc:creator>
		
		<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://tenbrink.us/?p=174</guid>
		<description><![CDATA[Microsoft continues the move away from &#8220;legacy&#8221; API&#8217;s for Exchange Server and more into Web Services with the next version of Exchange.
The Exchange Developer team has posted details of their roadmap on their blog.
]]></description>
			<content:encoded><![CDATA[<p>Microsoft continues the move away from &#8220;legacy&#8221; API&#8217;s for Exchange Server and more into Web Services with the next version of Exchange.</p>
<p>The Exchange Developer team has posted <a href="http://blogs.msdn.com/exchangedev/archive/2008/05/22/exchange-developer-roadmap.aspx">details of their roadmap </a>on their blog.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TenBrinkTech?a=GvxYuYi4OXI:K1TBcY-KOsw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TenBrinkTech?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TenBrinkTech/~4/GvxYuYi4OXI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tenbrink.us/index.php/2008/06/17/exchange-api-roadmap/feed/</wfw:commentRss>
		<feedburner:origLink>http://tenbrink.us/index.php/2008/06/17/exchange-api-roadmap/</feedburner:origLink></item>
		<item>
		<title>PowerShell One Liner for Directory Lookup</title>
		<link>http://feedproxy.google.com/~r/TenBrinkTech/~3/dhnyV6ptKKc/</link>
		<comments>http://tenbrink.us/index.php/2008/05/30/powershell-one-liner-for-directory-lookup/#comments</comments>
		<pubDate>Fri, 30 May 2008 23:50:00 +0000</pubDate>
		<dc:creator>dillon</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://tenbrink.us/?p=173</guid>
		<description><![CDATA[Upon request from one of my coworkers, a one-liner for DN from an AD account name.
$a=read-host; $s=New-Objectdirectoryservices.directorysearcher(&#8221;LDAP://dc=yerdomainhere&#8221;);$s.filter=&#8221;(sAMAccountName=$a)&#8221;; $s.findone().path
Yeah, sad use of the semicolon I know, but it&#8217;s a 2 minute job.  
]]></description>
			<content:encoded><![CDATA[<p>Upon request from one of my coworkers, a one-liner for DN from an AD account name.<br />
<blockquote>$a=read-host; $s=New-Object<br />directoryservices.directorysearcher(&#8221;LDAP://dc=yerdomainhere&#8221;);<br />$s.filter=&#8221;(sAMAccountName=$a)&#8221;; $s.findone().path</p></blockquote>
<p>Yeah, sad use of the semicolon I know, but it&#8217;s a 2 minute job. <img src='http://tenbrink.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TenBrinkTech?a=dhnyV6ptKKc:hXMkWdnHg4A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TenBrinkTech?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TenBrinkTech/~4/dhnyV6ptKKc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tenbrink.us/index.php/2008/05/30/powershell-one-liner-for-directory-lookup/feed/</wfw:commentRss>
		<feedburner:origLink>http://tenbrink.us/index.php/2008/05/30/powershell-one-liner-for-directory-lookup/</feedburner:origLink></item>
	</channel>
</rss>
