<?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>Saved for later reference &#187; active directory</title>
	<atom:link href="http://www.lejordet.com/tag/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lejordet.com</link>
	<description>online repository of stuff I had to google for hours to figure out</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Active Directory user GUID</title>
		<link>http://www.lejordet.com/2010/07/active-directory-user-guid/</link>
		<comments>http://www.lejordet.com/2010/07/active-directory-user-guid/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 13:26:36 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=106</guid>
		<description><![CDATA[PowerShell oneliner to get AD user GUID]]></description>
			<content:encoded><![CDATA[<p>I found 
<a  href="http://msgoodies.blogspot.com/2008/02/get-active-directory-object-guid-one.html" onclick="javascript:pageTracker._trackPageview('/external/msgoodies.blogspot.com/2008/02/get-active-directory-object-guid-one.html');" >this page</a> which contains an old oneliner to get a user GUID in PowerShell &#8211; but sadly it doesn&#8217;t work anymore.</p>
<p>After some tricking around, I found the following to work:</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">new-object</span> Guid<span style="color: #000000;">&#40;</span><span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>directoryservices.directorysearcher<span style="color: #000000;">&#93;</span> <span style="color: #800000;">&quot;(samaccountname=theuser)&quot;</span><span style="color: #000000;">&#41;</span>.findall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>.properties<span style="color: #000000;">&#91;</span><span style="color: #800000;">&quot;objectguid&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.ToString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/07/active-directory-user-guid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
