<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Arul Kumaravel's WebLog</title><link>http://blogs.msdn.com/arulk/default.aspx</link><description>Windows PowerShell technology blog
</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Free English version of Windows PowerShell Course book</title><link>http://blogs.msdn.com/arulk/archive/2007/05/10/free-english-version-of-windows-powershell-course-book.aspx</link><pubDate>Thu, 10 May 2007 20:44:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2527031</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/2527031.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=2527031</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=2527031</wfw:comment><description>&lt;p&gt;Frank Koch has translated his Windows PowerShell course book into English and made it available for free.&amp;nbsp; You can get the free book &lt;a href="https://blogs.technet.com/chitpro-de/archive/2007/05/10/english-version-of-windows-powershell-course-book-available-for-download.aspx"&gt;here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Arul Kumaravel&lt;/p&gt; &lt;p&gt;Windows PowerShell Development Manager&lt;/p&gt; &lt;p&gt;Microsoft Corporation.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2527031" width="1" height="1"&gt;</description></item><item><title>How Can I Delete All the Duplicates in a Set of Processes But Keep the Oldest Process?</title><link>http://blogs.msdn.com/arulk/archive/2007/05/08/how-can-i-delete-all-the-duplicates-in-a-set-of-processes-but-keep-the-oldest-process.aspx</link><pubDate>Wed, 09 May 2007 02:06:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2489181</guid><dc:creator>arulk</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/arulk/comments/2489181.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=2489181</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=2489181</wfw:comment><description>&lt;p&gt;&amp;nbsp; This blog corresponds to the scripting guy &lt;a href="http://www.microsoft.com/technet/scriptcenter/resources/qanda/may07/hey0507.mspx"&gt;column&lt;/a&gt; with the same title.&amp;nbsp;&amp;nbsp; I am posting the script for doing the same with PowerShell&lt;/p&gt; &lt;div&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; $processes = get-wmiobject -query &lt;span style="color: #006080"&gt;"Select * from win32_process where name = 'notepad.exe'"&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ($processes.count &lt;span style="color: #cc6633"&gt;-le&lt;/span&gt;  2 )&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; $datetarget = [DateTime]::Now&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; ($&lt;span style="color: #0000ff"&gt;process&lt;/span&gt; &lt;span style="color: #0000ff"&gt;in&lt;/span&gt;  $processes)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;    $dateholder =  $&lt;span style="color: #0000ff"&gt;process&lt;/span&gt;.CreationDate&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;    $dateholder =  $&lt;span style="color: #0000ff"&gt;process&lt;/span&gt;.ConvertToDateTime($dateholder)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $dateholder &lt;span style="color: #cc6633"&gt;-le&lt;/span&gt;  $datetarget)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;    {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     $processid =   $&lt;span style="color: #0000ff"&gt;process&lt;/span&gt;.ProcessID&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         $datetarget  =  $dateholder&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;    }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt; $processes = get-wmiobject -query &lt;span style="color: #006080"&gt;" select * from win32_process where name='notepad.exe' AND processID &amp;lt;&amp;gt; $processid"&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  25:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  26:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; ($&lt;span style="color: #0000ff"&gt;process&lt;/span&gt; &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; $processes)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  27:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  28:&lt;/span&gt;    $&lt;span style="color: #0000ff"&gt;process&lt;/span&gt;.Terminate()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  29:&lt;/span&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2489181" width="1" height="1"&gt;</description></item><item><title>How Can I Determine the Day of the Week?</title><link>http://blogs.msdn.com/arulk/archive/2006/11/30/how-can-i-determine-the-day-of-the-week.aspx</link><pubDate>Thu, 30 Nov 2006 17:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1171643</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/1171643.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=1171643</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=1171643</wfw:comment><description>&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey, PowerShell! I have a script that does certain management tasks based on the day of the week. I know how get the date in a script, but how can I tell whether it’s a Monday or a Tuesday or whatever? 
&lt;P&gt;This is very easy to do with Syste.Datetime class. 
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;param&lt;/SPAN&gt; ([system.datetime]$date = $([system.datetime]::now))&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;$dayofweek = $date.DayOfWeek&lt;/PRE&gt;&lt;PRE&gt;$intday = [int] $date.DayOfWeek&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Write-Output &lt;SPAN class=str&gt;"The day of given date is $dayofweek  and numerical value of day is $intday"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Let's see how this script works &amp;nbsp;The script begins by assigning the date from commandline or current date &amp;nbsp;to a variable named $date. 
&lt;P&gt;Next we use the&amp;nbsp;&lt;STRONG&gt;DayofWeek&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;property&amp;nbsp;to determine the day of the week for&amp;nbsp;given date&amp;nbsp; DayofWeek is going to return one of the following value .&amp;nbsp; This is [System.DayOfWeek]&amp;nbsp; enum class values. 
&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sunday 
&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Monday 
&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tuesday 
&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wednesday 
&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thursday 
&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Friday 
&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Saturday &lt;/P&gt;
&lt;P&gt;if you want the numerical value of this enum, you can convert it to integer by using the [int] type converter. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1171643" width="1" height="1"&gt;</description></item><item><title>How Can I Determine the Date for the Friday in a Given Week?</title><link>http://blogs.msdn.com/arulk/archive/2006/11/29/how-can-i-determine-the-date-for-the-friday-in-a-given-week.aspx</link><pubDate>Wed, 29 Nov 2006 17:27:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1171524</guid><dc:creator>arulk</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/arulk/comments/1171524.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=1171524</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=1171524</wfw:comment><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;Hey, Powershell! Given a date, can a script tell me the date that the Friday for that week occurs?  &lt;p&gt;&amp;nbsp;  &lt;p&gt;&amp;nbsp;Here’s a script that – given a date – will report back the date that the Friday of that week falls on:  &lt;p&gt;&amp;nbsp;  &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;param&lt;/span&gt; ([system.datetime]$date = $([system.datetime]::now))&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;$intday = [int] $date.DayOfWeek&lt;/pre&gt;&lt;pre&gt;$intadder =  5 - $intday&lt;/pre&gt;&lt;pre class="alt"&gt;$dateFriday = $date.AddDays( $intadder)&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;Write-Output &lt;span class="str"&gt;"The friday of the given date is  $dateFriday"&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;div class="csharpcode"&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Let's see how this script works &amp;nbsp;The script begins by assigning the date from commandline or current date &amp;nbsp;to a variable named $date. 
&lt;p&gt;&amp;nbsp; 
&lt;p&gt;Next we use the&amp;nbsp;&lt;strong&gt;DayofWeek&amp;nbsp;&lt;/strong&gt;&amp;nbsp;property&amp;nbsp;to determine the day of the week for&amp;nbsp;given date&amp;nbsp; DayofWeek is going to return one of the following value 
&lt;p&gt;&amp;nbsp; 
&lt;p&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sunday 
&lt;p&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Monday 
&lt;p&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tuesday 
&lt;p&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wednesday 
&lt;p&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thursday 
&lt;p&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Friday 
&lt;p&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Saturday 
&lt;p&gt;&amp;nbsp; 
&lt;p&gt;This gives us a value representing the day of the week; What we need to do now is programmatically determine the number of days between this date and the Friday of that week. That’s something we can do with a single line of code: 
&lt;p&gt;$intadder =&amp;nbsp;5 - $intDay 
&lt;p&gt;Confused? Don’t be; this actually makes sense. If you refer to the table you’ll see that Friday has a value of 5. If we take the value for Friday (5) and subtract the value for&amp;nbsp; given date&amp;nbsp;we will get the&amp;nbsp;days to add to get Friday.&amp;nbsp; That’s what we do with this line of code: 
&lt;p&gt;$dateFriday&amp;nbsp;= $date.AddDays($intddder) 
&lt;p&gt;&amp;nbsp; 
&lt;p&gt;System.DateTime is a powerful class that allows you to do date manipulation very easily in PowerShell 
&lt;p&gt;&amp;nbsp; 
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/arulk/WindowsLiveWriter/HowCanIDeterminetheDatefortheFridayinaGi_61B2/powershell_icon%5B1%5D.jpg" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="177" src="http://blogs.msdn.com/blogfiles/arulk/WindowsLiveWriter/HowCanIDeterminetheDatefortheFridayinaGi_61B2/powershell_icon.jpg" width="240" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;---------------------------------------------------------------------------------------------------------------------- 
&lt;p&gt;Arul Kumaravel 
&lt;p&gt;Development Manager 
&lt;p&gt;Windows PowerShell&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1171524" width="1" height="1"&gt;</description></item><item><title>How Can I Determine the Beginning and Ending Date of the Previous Month?</title><link>http://blogs.msdn.com/arulk/archive/2006/11/22/how-can-i-determine-the-beginning-and-ending-date-of-the-previous-month.aspx</link><pubDate>Wed, 22 Nov 2006 17:51:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1122538</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/1122538.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=1122538</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=1122538</wfw:comment><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Hey, PowerShell! Given a specific date, how can I determine the beginning and ending date of the previous month? In other words, given 8/11/2005, I need to get back 7/1/2005 and 7/31/2005.&lt;/strong&gt; &lt;p&gt;Powershell provides access to .Net framework.&amp;nbsp; We can use .Net framework&amp;nbsp; DateTime class to solve the problem.&amp;nbsp; Let's write a script to solve this. &lt;p&gt;First, we need to get the date for which we need to determine the beginning and ending date of previous month. We can do this using PowerShell Param statement &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;Param ([System.Datetime] $date = $(get-date))&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In the above statement, we are declaring a parameter of type Syste.DateTime.&amp;nbsp; We are also initializing it to current date when no parameter is specified.&amp;nbsp; It works as follows.&amp;nbsp; Let's say that we have saved the above as script file&amp;nbsp; BeginEndPrevMonth.ps1 then &lt;blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;\BeginEndPrevMonth.ps1&amp;nbsp; 11/18/2006&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;will set the $date variable to&amp;nbsp; 11/18/2006.&amp;nbsp; However, if you don't specify the parameter like &lt;/font&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;.\BeginEndPrevMonth.ps1&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;then PowerShell parser will execute the&amp;nbsp; $(get-date)&amp;nbsp; which will get you the current date and time and this value gets assigned to $date. &lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&amp;nbsp; &lt;p&gt;&lt;font color="#000000"&gt;Let's move on.&amp;nbsp; Now that we have a date,&amp;nbsp; we need to find the beginning and endind date of the previous month of this date.&amp;nbsp; Let's start the end date.&amp;nbsp; if I have a date like&amp;nbsp; 8/11/2005,&amp;nbsp; then I find out the last date of previous month by subtracting the number of days in the current date.&amp;nbsp; In the example, if I subtract 11 then I will get 7/31/2005.&amp;nbsp; We can accomplish this in the script as follows&lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&amp;nbsp; &lt;p&gt;&lt;font color="#000000"&gt;First,&amp;nbsp; determine the number of days in given date&lt;/font&gt; &lt;blockquote&gt; &lt;p&gt;$numdays = $date.Day&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Once we have determined the number days,&amp;nbsp; we need to subtract this from the current date to get the last date of previous month.&amp;nbsp; There is no subract method available in&amp;nbsp; Datetime class. however, there is a AddDays method.&amp;nbsp; We can use this method to subtract days by passing in a&amp;nbsp; negative value to add.&amp;nbsp;  &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;$prevmonthlastday = $date.AddDays(- $numdays)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;We are calling&amp;nbsp; AddDays method in DateTime with&amp;nbsp; - $numdays to subtract the number of days.&amp;nbsp; We use the similar logic to subtract the number of days from&amp;nbsp; $prevmonthlastday to determine that last day of previou to previous month and then add 1 day to get the first date. &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;$numdays = $prevmonthlastday.Day&lt;br&gt;$prevmonthfirstday = $prevmonthlastday.AddDays( -$numdays + 1)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;The full script is&amp;nbsp; as follows &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;Param ([system.Datetime] $date = $(get-date))  &lt;p&gt;Write-Output $("The selected date is {0}" -f $date )&lt;/p&gt; &lt;p&gt;&lt;br&gt;$numdays = $date.Day&lt;/p&gt; &lt;p&gt;&lt;br&gt;$prevmonthlastday = $date.AddDays(-$numdays) &lt;/p&gt; &lt;p&gt;Write-Output $("Last date of previous month of given date is {0}" -f $prevmonthlastday )  &lt;p&gt;$numdays = $prevmonthlastday.Day&lt;br&gt;$prevmonthfirstday = $prevmonthlastday.AddDays( -$numdays + 1)  &lt;p&gt;Write-Output $("First date of previous month of given date is {0}" -f $prevmonthfirstday)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;There you go ,&amp;nbsp; a script to determine beginning and ending date of previous month of a given date. &lt;p&gt;----------------------------------------------------------------------------------------------------------------------------------------------------------------- &lt;p&gt;Arul Kumaravel &lt;p&gt;Development Manager &lt;p&gt;Windows PowerShell &lt;p&gt;&amp;nbsp; &lt;p&gt;&amp;nbsp; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1122538" width="1" height="1"&gt;</description></item><item><title>Transcript of Solving Management Problems with Windows PowerShell</title><link>http://blogs.msdn.com/arulk/archive/2006/11/19/transcript-of-solving-management-problems-with-windows-powershell.aspx</link><pubDate>Mon, 20 Nov 2006 00:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1104853</guid><dc:creator>arulk</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/arulk/comments/1104853.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=1104853</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=1104853</wfw:comment><description>&lt;P&gt;Along with Jeffrey,&amp;nbsp;I presented Solving Management Problems with Windows PowerShell session at TechEd Barcelona.&amp;nbsp;&amp;nbsp; Many people asked for the script examples&amp;nbsp; I used during the presentation. Attached zip file contains transcript as well as input files used during presentation.&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arul Kumaravel [MSFT]&lt;/P&gt;
&lt;P&gt;Development Manager,&lt;/P&gt;
&lt;P&gt;Windows PowerShell,&lt;/P&gt;
&lt;P&gt;My PowerShell blog: &lt;A href="http://blogs.msdn.com/arulk" mce_href="http://blogs.msdn.com/arulk"&gt;http://blogs.msdn.com/arulk&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1104853" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/arulk/attachment/1104853.ashx" length="74230" type="application/x-zip-compressed" /></item><item><title>Windows PowerShell 1.0 Launched</title><link>http://blogs.msdn.com/arulk/archive/2006/11/14/windows-powershell-1-0-launched.aspx</link><pubDate>Tue, 14 Nov 2006 13:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1074281</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/1074281.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=1074281</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=1074281</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;I am here at TechED-IT Forum at&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Barcelona, Spain.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Today, in his keynote address Bob Muglia, Senior Vice President, Microsoft Corporation, officially launched Windows PowerShell 1.0.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Jeffrey Snover showed an awesome demo of using PowerShell to manage IIS 7&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;in Longhorn&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Server.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;PowerShell has been multiyear effort by many members of Windows PowerShell team.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We would like to take this time to thank all our early adopters and customers who provided us with valuable feedback in shaping up this product. It is with pride that we launch this product.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;PowerShell is ready for primetime to solve management problems one script at a time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1074281" width="1" height="1"&gt;</description></item><item><title>Reading Attributes of Directory Service Objects</title><link>http://blogs.msdn.com/arulk/archive/2006/08/24/719241.aspx</link><pubDate>Fri, 25 Aug 2006 01:28:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:719241</guid><dc:creator>arulk</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/arulk/comments/719241.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=719241</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=719241</wfw:comment><description>&lt;p&gt;The previous blogs described how to create an OU, a user account, and a group, and set the description attribute on each of these objects. The next common task is to read an attribute of each object.  &lt;p&gt;Reading an Active Directory object’s attributes involves two simple steps:  &lt;ol&gt; &lt;li&gt;Connect to the Active Directory object you want to read.  &lt;li&gt;Read one or more of the object’s attributes.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The goal of the three scripts in this blog will be to read the description attribute of the HR OU, the MyerKen user account, and the Atl-Users group and display their values on the screen.  &lt;p&gt;&lt;b&gt;Reading an Attribute of an OU&lt;/b&gt; &lt;p&gt;The&amp;nbsp; following script reads and displays the description attribute of the OU named HR in the na.fabrikam.com domain. To carry out this task, the script performs the following steps:  &lt;ol&gt; &lt;li&gt;Connect to the HR OU object in the na.fabrikam.com domain.  &lt;li&gt;Read the object’s description attribute.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Reading the description Attribute of an OU&lt;/b&gt; &lt;p&gt;$objOU = [ADSI]"LDAP://localhost:389/OU=HR,dc=NA,dc=fabrikam,dc=com" &lt;p&gt;$objOU.Get("description") &lt;p&gt;When this script runs in the na.fabrikam.com domain, it echoes the description of the HR OU to the command window, as shown: &lt;p&gt;Human Resources &lt;p&gt;&lt;b&gt;Reading an Attribute of a User Account&lt;/b&gt; &lt;p&gt;The following script&amp;nbsp;reads and displays the description attribute of the user account named MyerKen, located in the HR OU of the na.fabrikam.com domain.  &lt;ol&gt; &lt;li&gt;Connect to the MyerKen user account object in the HR OU of the na.fabrikam.com domain.  &lt;li&gt;Read the object’s description attribute.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Reading the description Attribute of a User Account&lt;/b&gt; &lt;p&gt;$objUser = [ADSI]"LDAP://localhost:389/CN=MyerKen,OU=HR,dc=NA,dc=fabrikam,dc=com" &lt;p&gt;$objUser.Get("description") &lt;p&gt;When this script runs in the na.fabrikam.com domain, it echoes the description of the user account to the command window, as shown: &lt;p&gt;HR employee &lt;p&gt;&lt;b&gt;Reading an Attribute of a Group&lt;/b&gt; &lt;p&gt;The following script reads and displays the description attribute of a global group named Atl-Users, located in the HR OU of the na.fabrikam.com domain.  &lt;ol&gt; &lt;li&gt;Connect to the Atl-Users group in the HR OU of the na.fabrikam.com domain.  &lt;li&gt;Read the object’s description attribute.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Reading the description Attribute of a Group&lt;/b&gt; &lt;p&gt;$objGroup =[ADSI]"LDAP://localhost:389/CN=Atl-users,OU=HR,dc=NA,dc=fabrikam,dc=com" &lt;p&gt;$objGroup.Get("description") &lt;p&gt;When this script runs in the na.fabrikam.com domain, it echoes the description of the group to the command window, as shown: &lt;p&gt;Atlanta users &lt;p&gt;Important observations about the scripts in this blog  &lt;ul&gt; &lt;li&gt;They perform the same basic steps: They connect to an Active Directory object and read an attribute of the object.  &lt;li&gt;They use the same method (Get) without regard to the class of object being read.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;As demonstrated in this blog, the process for reading attributes is uniform from one object to the next. In fact, within a particular task, the steps you follow from one object to the next are consistent. This consistency empowers you to write scripts that can read thousands of attributes from the many objects stored in Active Directory.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=719241" width="1" height="1"&gt;</description></item><item><title>New community project created for Windows PowerShell Extensions</title><link>http://blogs.msdn.com/arulk/archive/2006/08/07/691346.aspx</link><pubDate>Mon, 07 Aug 2006 22:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:691346</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/691346.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=691346</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=691346</wfw:comment><description>&lt;p&gt;We have worked with CodePlex team to create a new Community Project for Windows PowerShell.&amp;nbsp;&amp;nbsp; Keith Hill, MVP for Windows PowerShell, will be the project coordinator.&amp;nbsp; Microsoft employees won't be able to participate in the community projects directly due to legal issues. However, I sincerely hope that community participates in this project and contribute.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;You can access the project at&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=PowerShellCX"&gt;http://www.codeplex.com/Wiki/View.aspx?ProjectName=PowerShellCX&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Existing&amp;nbsp; Windows PowerShell GotDotNet project at &lt;font color="#000080" size="2"&gt;&lt;/p&gt; &lt;dir&gt; &lt;dir&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;p&gt;&lt;/font&gt;&lt;a href="http://www.gotdotnet.com/workspaces/workspace.aspx?id=bd8982c2-9e47-4793-b7c8-35a4c9105330"&gt;&lt;u&gt;&lt;font color="#0000ff" size="2"&gt;http://www.gotdotnet.com/workspaces/workspace.aspx?id=bd8982c2-9e47-4793-b7c8-35a4c9105330&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:personname w:st="on"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;&lt;font color="#000080" size="2"&gt; &lt;dir&gt; &lt;dir&gt;&lt;/font&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;/span&gt;&lt;/st1:personname&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;st1:personname w:st="on"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;&lt;font color="#000000"&gt;will be migrated over to this project.&lt;/font&gt;&lt;/span&gt;&lt;/st1:personname&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;st1:personname w:st="on"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/st1:personname&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;st1:personname w:st="on"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/st1:personname&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;st1:personname w:st="on"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;Arul Kumaravel&lt;/span&gt;&lt;/st1:personname&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;Development Manager &lt;/span&gt;&lt;span style="font-size: 12pt; color: blue; font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;Windows PowerShell&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 12pt; color: navy; font-family: 'Times New Roman'"&gt;Microsoft Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 12pt; color: blue; font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=691346" width="1" height="1"&gt;</description></item><item><title>Technorati Profile</title><link>http://blogs.msdn.com/arulk/archive/2006/08/04/688826.aspx</link><pubDate>Fri, 04 Aug 2006 22:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:688826</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/688826.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=688826</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=688826</wfw:comment><description>Here is my Technorati profile information for this blog. &lt;a href="http://technorati.com/claim/si8igf32sw" rel="me"&gt;Technorati Profile&lt;/a&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=688826" width="1" height="1"&gt;</description></item><item><title>Modifying Directory Service Objects with Windows PowerShell</title><link>http://blogs.msdn.com/arulk/archive/2006/07/28/682289.aspx</link><pubDate>Sat, 29 Jul 2006 07:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:682289</guid><dc:creator>arulk</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/arulk/comments/682289.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=682289</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=682289</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modifying an object is equivalent to writing an attribute to an existing object in Active Directory. If an attribute contains a value, modifying it will clear the existing value and replace it with a different value.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Typically, the type of modification you make to an object will depend on the type of object you want to modify and various characteristics of the attribute — for example, whether the attribute holds a single value or multiple values. For simplicity, however, the following task descriptions illustrate how to write a single value to the same attribute in three different objects.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modifying attributes of Active Directory objects involves three basic steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;1.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Connect to the Active Directory object you want to modify. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;2.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modify one or more of the object’s attributes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;3.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Commit the change to Active Directory.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;The goal of the three scripts in this section is to write an attribute to each of the objects created in "Creating Directory Service Objects"&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;blog. The objects include the HR OU, the MyerKen user account, and the Atl-Users global group. The description attribute is contained in all three of these objects, so it is used as the attribute to modify.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modifying an Attribute of an OU&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;The following script modifies the description attribute of the OU named HR in the na.fabrikam.com domain. The description attribute is assigned the value Human Resources. To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;1.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Connect to the HR OU object in the na.fabrikam.com domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;In contrast with the create task, the HR OU is referred to as an object rather than a container because the task completed in this script is to write an attribute of an object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;2.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modify the object’s attributes by assigning the description attribute the value Human Resources. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;3.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Commit the change to the OU in Active Directory.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Writing the description Attribute to an OU&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objOU = [ADSI]"LDAP://localhost:389/ou=HR,dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objOU.Put("description", "Human Resources")&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objOU.SetInfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modifying an Attribute of a User Account&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;The following script modifies the description attribute of the user account named MyerKen in the HR OU of the na.fabrikam.com domain. The description attribute is assigned the value HR employee. To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;1.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Connect to the MyerKen user account object in the HR OU of the na.fabrikam.com domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;2.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modify the object’s attributes by assigning the description attribute the value HR employee. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;3.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Commit the change to the user account in Active Directory.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Writing the description Attribute to a User Account&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;$objUser = [ADSI]"LDAP://localhost:389/cn=MyerKen,ou=HR,dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;$objUser.Put("description", "HR employee")&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;$objUser.SetInfo()&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modifying an Attribute of a Group&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;The following script modifies the description attribute of the group account named Atl-Users in the HR OU of the na.fabrikam.com domain. The description attribute is assigned the value of &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Atlanta&lt;/st1:City&gt;&lt;/st1:place&gt; users. To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;1.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Connect to the Atl-Users group in the HR OU of the na.fabrikam.com domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;2.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Modify the object’s attributes by assigning the description attribute the value &lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Atlanta&lt;/st1:City&gt;&lt;/st1:place&gt; users. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Trebuchet MS'; mso-fareast-font-family: 'Trebuchet MS'"&gt;3.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Trebuchet MS'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Commit the change to the group in Active Directory.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Writing the description Attribute to a Group&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objGroup = [ADSI]"LDAP://localhost:389/cn=Atl-users,ou=HR,dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objGroup.Put("description", "&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Atlanta&lt;/st1:City&gt;&lt;/st1:place&gt; users")&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'; mso-bidi-font-family: 'Courier New'"&gt;$objGroup.SetInfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;Important observations about the scripts in this section are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; COLOR: blue; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Trebuchet MS'"&gt;They perform the same basic steps: They connect to an Active Directory object, modify an attribute of the object, and write the change to the corresponding Active Directory object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; COLOR: blue; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Trebuchet MS'"&gt;They use the same method (Put) without regard to the class of object being modified.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;st1:PersonName w:st="on"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;Arul Kumaravel&lt;/SPAN&gt;&lt;/st1:PersonName&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;Development Manager &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;Windows PowerShell&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;Microsoft Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;PSMDTAG:FAQ: How to modify directory Services objects ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: navy; FONT-FAMILY: 'Times New Roman'"&gt;PSMDTAG:FAQ: How to&amp;nbsp;modify &amp;nbsp;ADSI objects?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=682289" width="1" height="1"&gt;</description></item><item><title>WindowsITPro article on Windows PowerShell</title><link>http://blogs.msdn.com/arulk/archive/2006/07/27/680460.aspx</link><pubDate>Thu, 27 Jul 2006 20:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:680460</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/680460.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=680460</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=680460</wfw:comment><description>&lt;P&gt;Windows IT Pro Magazine has an article on Windows PowerShell&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.windowsitpro.com/Windows/Article/ArticleID/50565/50565.html"&gt;http://www.windowsitpro.com/Windows/Article/ArticleID/50565/50565.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Check it out.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT color=#000080&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:PersonName w:st="on"&gt;Arul Kumaravel&lt;/st1:PersonName&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT color=#000080&gt;&lt;st1:PersonName w:st="on"&gt;&lt;/st1:PersonName&gt;&lt;/FONT&gt;&lt;FONT color=#000080&gt;Development Manager &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT color=#000080&gt;Windows PowerShell&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT color=#000080&gt;Microsoft Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=680460" width="1" height="1"&gt;</description></item><item><title>ADSI Scripting with Windows PowerShell.</title><link>http://blogs.msdn.com/arulk/archive/2006/07/25/678137.aspx</link><pubDate>Tue, 25 Jul 2006 22:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:678137</guid><dc:creator>arulk</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/arulk/comments/678137.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=678137</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=678137</wfw:comment><description>&lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;We have made significant improvements in ADSI support in the upcoming release of Windows PowerShell RC2.&amp;nbsp; In this and future blogs, I will talk about how to use Windows PowerShell for ADSI Scripting.&amp;nbsp; Windows Scripting Guide 2000 provided scripting examples with VBS. The content for this blog is adapted from Windows 2000 Scripting guide.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font face="Times New Roman" color="#000080" size="4"&gt;&lt;strong&gt;ADSI Scripting with Windows PowerShell&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;Active Directory management is all about management of directory objects from creation to deletion.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;There are four main categories of tasks in active directory management&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="margin-top: 0in" type="1"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;Create&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;  &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;Modify&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;  &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;Read&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;  &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;Delete&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;font color="#000080"&gt;We will take a look at how to do these tasks using Windows PowerShell Scripts.&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 1"&gt;&lt;a name="sas_ads_fhnx"&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="font-size: 24pt; mso-font-kerning: 18.0pt"&gt;&lt;font size="4"&gt;&lt;font color="#000080"&gt;Creating Directory Service Objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Creating Active Directory objects involves four basic steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l5 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Connect to the Active Directory container that will store the new object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l5 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Create the object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l5 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Set the object’s mandatory attributes, if necessary. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l5 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Commit the new object to Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;The goal of the three scripts in this section is to create an OU named HR (Human Resources department), a user account named MyerKen in the HR OU, and a group named Atl-Users, also in the HR OU.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 18pt"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 18pt"&gt;&lt;font size="4"&gt;&lt;font color="#000080"&gt;Creating an OU&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;The following script creates an OU named HR in the na.fabrikam.com domain. All mandatory attributes of an OU are automatically assigned a value by Active Directory. Therefore, the step that sets mandatory attributes does not appear in this script&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Connect to the na.fabrikam.com domain container. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Create an OU object named HR. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Commit the new OU to Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;b&gt;&amp;nbsp;Creating an OU&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objDomain = [ADSI]"LDAP://localhost:389/dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objOU = $objDomain.Create("organizationalUnit", "ou=HR")&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objOU.SetInfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 18pt"&gt;&lt;font size="4"&gt;&lt;font color="#000080"&gt;Creating a User Account&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;The following script &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;creates a user account named MyerKen in the OU named HR. The HR OU is located in the na.fabrkam.com domain. To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l4 level1 lfo4; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Connect to the HR OU container in the na.fabrikam.com domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;HR is the OU that was created by running the previous script&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1" start="2"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l4 level1 lfo4; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Create a user account named MyerKen. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Using an uppercase letter for the first letter of the last and first name is not necessary. However, the case is preserved when the object is saved to Active Directory. Therefore, users will be able to distinguish the last name from the first name when searching Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1" start="3"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l4 level1 lfo4; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Set the sAMAccountName mandatory attribute to the value myerken. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;There is no need to capitalize the first letter of the last and first name for this attribute’s value because, typically, users do not perform user account searches on the sAMAccountName attribute.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1" start="4"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l4 level1 lfo4; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Commit the new user account to Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;b&gt;Creating a User Account&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objOU = [ADSI]"LDAP://localhost:389/ou=HR,dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objUser = $objOU.Create("user", "cn=MyerKen")&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objUser.Put("sAMAccountName", "myerken")&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;$objUser.SetInfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 2"&gt;&lt;b&gt;&lt;span style="font-size: 18pt"&gt;&lt;font size="4"&gt;&lt;font color="#000080"&gt;Creating a Group&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;The following script creates a global group named Atl-Users in the OU named HR, located in the na.fabrikam.com domain. To carry out this task, the script performs the following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l3 level1 lfo5; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Connect to the HR OU container in the na.fabrikam.com domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l3 level1 lfo5; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Create a group named Atl-Users. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;By default, the script creates a global group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1" start="3"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l3 level1 lfo5; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Set the sAMAccountName mandatory attribute to a value of Atl-Users. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Like creating a user account, creating a security group requires a single mandatory attribute, sAMAccountName.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ol type="1" start="4"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l3 level1 lfo5; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Commit the new group account to Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;font color="#000080"&gt;Creating a Group&lt;/font&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;font color="#000080"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;&lt;strong&gt;$objOU = [ADSI]"LDAP://localhost:389/ou=HR,dc=NA,dc=fabrikam,dc=com"&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;&lt;strong&gt;$objGroup = $objOU.Create("group", "cn=Atl-Users")&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;&lt;strong&gt;$objGroup.Put("sAMAccountName", "Atl-Users")&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;font color="#000080"&gt;&lt;strong&gt;$objGroup.SetInfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" style="width: 100%; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-cellspacing: 1.5pt" cellpadding="0" width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt; &lt;td style="border-right: #ece9d8; padding-right: 0.75pt; border-top: #ece9d8; padding-left: 0.75pt; padding-bottom: 0.75pt; border-left: #ece9d8; padding-top: 0.75pt; border-bottom: #ece9d8; background-color: transparent"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/td&gt; &lt;td style="border-right: #ece9d8; padding-right: 0.75pt; border-top: #ece9d8; padding-left: 0.75pt; padding-bottom: 0.75pt; border-left: #ece9d8; padding-top: 0.75pt; border-bottom: #ece9d8; background-color: transparent"&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Important observations about the scripts in this section are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;ul type="disc"&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo6; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;They perform the same basic steps: They connect to an Active Directory container, create an object, set the object’s mandatory attributes (if necessary), and commit the object to Active Directory. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo6; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;They use the same method (Create) without regard to the class of the object being created. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo6; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;The script parameters are the only parts of the scripts that are different. Each script contains the class name (organizationalUnit, user, and group) identifying the type of object to create and the object’s corresponding attributes (the new object’s name and the user’s and group’s mandatory sAMAccountName attribute).&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;We will look into other tasks in future blog postings.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:personname w:st="on"&gt;Arul Kumaravel&lt;/st1:personname&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Development Manager &lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Windows PowerShell&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;Microsoft Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;o:p&gt;&lt;font color="#000080"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;PSMDTAG:FAQ: How to create directory Services objects &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;font color="#000080"&gt;PSMDTAG:FAQ: How to create ADSI objects?&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=678137" width="1" height="1"&gt;</description></item><item><title>Windows PowerShell blog for French users</title><link>http://blogs.msdn.com/arulk/archive/2006/05/16/599270.aspx</link><pubDate>Tue, 16 May 2006 23:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:599270</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/599270.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=599270</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=599270</wfw:comment><description>&lt;P&gt;&lt;FONT face=Verdana color=#0000ff&gt;Jacques Barathon has created a new&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://spaces.msn.com/janel/"&gt;&lt;FONT face=Verdana color=#0000ff&gt;Windows PowerShell blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana color=#0000ff&gt;.&amp;nbsp; What is unique about this blog is that it is entirely in French.&amp;nbsp; If you are on the French speaking administrator who is reluctant to try out Windows PowerShell due to lack of documentation then you should definitely check out his blog.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff&gt;Speaking of documentation in other languages, Windows PowerShell team is hard at work to localize the product and content to all Windows Server supported languages.&amp;nbsp; Expect to see localized content available soon.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=599270" width="1" height="1"&gt;</description></item><item><title>Training course for Windows PowerShell from DesktopEngineer.com</title><link>http://blogs.msdn.com/arulk/archive/2006/05/07/591932.aspx</link><pubDate>Sun, 07 May 2006 20:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591932</guid><dc:creator>arulk</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arulk/comments/591932.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arulk/commentrss.aspx?PostID=591932</wfw:commentRss><wfw:comment>http://blogs.msdn.com/arulk/rsscomments.aspx?PostID=591932</wfw:comment><description>&lt;P&gt;&lt;FONT face=Verdana color=#0000ff&gt;I came across this recently,DesktopEngineer.com has acourse on Windows PowerShell for Administrators.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff&gt;You can visit their website at &lt;A href="http://desktopengineer.com/ps310"&gt;http://desktopengineer.com/ps310&lt;/A&gt;&amp;nbsp;for more details.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=591932" width="1" height="1"&gt;</description></item></channel></rss>