<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>Search results for 'app:weblogs' matching tags 'Windows Server 2008 R2', 'Powershell', and 'Active Directory'</title><link>http://msmvps.com/search/SearchResults.aspx?q=app:weblogs&amp;tag=Windows+Server+2008+R2,Powershell,Active+Directory&amp;orTags=0&amp;o=DateDescending</link><description>Search results for 'app:weblogs' matching tags 'Windows Server 2008 R2', 'Powershell', and 'Active Directory'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Using PowerShell to Resolve SIDs to Friendly Names</title><link>http://msmvps.com/blogs/ad/archive/2010/10/07/using-powershell-to-resolve-sids-to-friendly-names.aspx</link><pubDate>Thu, 07 Oct 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1779573</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;Time and time again I run into an issue that presents me with a SID which I need to resolve.&amp;#160; I’ve used a number of tools and scripts over the years to address this issue.&amp;#160; I think I have the best and easiest method for me to solve this issue that always seems to pop up.&lt;/p&gt;  &lt;p&gt;If you’re new to PowerShell you will want to make sure you have it installed if you want to use this script…and yes it is a script not a command.&amp;#160; I do this by opening a text file and renaming it from a .txt file to a .ps1 file.&amp;#160; When you try to open a .ps1 file it may open in your text editor but for this you will want to Right Click it and select Edit which will open up whatever you have as your PowerShell editor.&amp;#160; Copy the following code into the Script Pane:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;$objSID = New-Object System.Security.Principal.SecurityIdentifier `       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (&amp;quot;S-1-5-21-768745588-123456789-987654321-500&amp;quot;)        &lt;br /&gt;$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])        &lt;br /&gt;$objUser.Value&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now just save this file and you can run it to return the results of the SID that you place in there.&amp;#160; The one thing that will change is the actual SID.&amp;#160; In this example i’m using S-1-5-21-768745588-123456789-987654321-500 which is the Well Known SID for the domain Administrator.&amp;#160; My results should show me the friendly name.&amp;#160; Anytime you change the SID you will have to resave the file but then just Run the script and it will show you the results.&lt;/p&gt;  &lt;p&gt;I’m sure there is a way I could make this into an application but I&amp;#39;ll leave that fun for those looking to take this to the next step.&lt;/p&gt;</description></item><item><title>Using PowerShell to Transfer FSMO Roles</title><link>http://msmvps.com/blogs/ad/archive/2010/08/10/using-powershell-to-transfer-fsmo-roles.aspx</link><pubDate>Tue, 10 Aug 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1775708</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;You may be familiar with the traditional ways to transfer FSMO roles but how about by using PowerShell?&amp;#160; By now you should just know that PowerShell can do everything the GUI can do…well at least that is the way it feels to me.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you want to use PowerShell to transfer any of your five FSMO roles (&lt;a href="http://msdn.microsoft.com/en-us/library/cc223752(v=PROT.10).aspx" target="_blank"&gt;PDC Emulater&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc223751(v=PROT.10).aspx" target="_blank"&gt;RID Master&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc223753(v=PROT.10).aspx" target="_blank"&gt;Infrastructure Master&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc223750(v=PROT.10).aspx" target="_blank"&gt;Domain Naming Master&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ff634482(v=PROT.10).aspx" target="_blank"&gt;Schema Master&lt;/a&gt;) then you will first need to import the Active Directory Module into PowerShell.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;ipmo activedirectory&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now that you have the AD module loaded the cmdlet you will use for this is quite large - Move-ADDirectoryServerOperationMasterRole.&amp;#160; Thankfully we have the Get-help cmdlet to help us remember that.&amp;#160; All I need to do is remember move-ad and then I press tab to complete the rest.&amp;#160; There is only one other cmdlet that is similar to it and you just have to remember you are trying to move the FSMO role and not the sever.&lt;/p&gt;  &lt;p&gt;When entering the cmdlet you need to specify the operation master roles to move. the syntax for the five roles are as follows - PDCEmulator, RIDMaster, InfrastructureMaster, SchemaMaster, or DomainNamingMaster. To specify more than one role just separate each role with a comma.&lt;/p&gt;  &lt;p&gt;An example of me moving the RID Master and PDC Emulater to DC2 is as follows:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Move-ADDirectoryServerOperationMasterRole -Identity &amp;quot;DC2&amp;quot; -OperationMasterRole RIDMaster,PDCEmulator&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;A feature that I just love in PowerShell is the –WhatIf parameter.&amp;#160; By adding this to your code it will do a dry run and let you know what is going to change if you did the command without that parameter.&lt;/p&gt;  &lt;p&gt;One key thing to note here is that I am NOT seizing the FSMO role.&amp;#160; For that you will need to use NTDSUtil as defined &lt;a href="http://technet.microsoft.com/en-us/library/cc816779(WS.10).aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Raising your Active Directory Functional Level with PowerShell</title><link>http://msmvps.com/blogs/ad/archive/2010/07/07/raising-your-active-directory-functional-level-with-powershell.aspx</link><pubDate>Wed, 07 Jul 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1773276</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;Here are two ways for you to use PowerShell to raise your Forest Functional level to Server 2008 R2:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;get-adforest | set-adforestmode -forestmode windows2008R2Forest –confirm:$false&lt;/li&gt;    &lt;li&gt;set-adforestmode –identity netbiosname windows2008R2Forest –confirm:$false&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Either way will work.&amp;#160; Enjoy&lt;/p&gt;</description></item><item><title>Seeing your Active Directory Tombstone Period with PowerShell</title><link>http://msmvps.com/blogs/ad/archive/2010/07/05/seeing-your-active-directory-tombstone-period-with-powershell.aspx</link><pubDate>Mon, 05 Jul 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1773272</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;Tip of the day today is to view your Active Directory Tombstone period while using PowerShell&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;From a PowerShell prompt, type&lt;/li&gt;    &lt;li&gt;(get-adobject &amp;quot;cn=Directory Service,cn=Windows NT,cn=Services,cn=Configuration,dc=AdminPrep,DC=Local&amp;quot; -properties &amp;quot;tombstonelifetime&amp;quot;).tombstonelifetime&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The result shows up in days…very cool.&amp;#160; &lt;/p&gt;  &lt;p&gt;Just make sure to change &lt;em&gt;dc=AdminPrep,DC=Local&lt;/em&gt; to match your domain.&lt;/p&gt;</description></item><item><title>How Active Directory PowerShell CMDLETS find a DC running Active Directory Web Services</title><link>http://msmvps.com/blogs/ad/archive/2010/01/25/how-active-directory-powershell-cmdlets-find-a-dc-running-active-directory-web-services.aspx</link><pubDate>Mon, 25 Jan 2010 06:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1753371</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;If you have been playing with the the AD PowerShell cmdlets you know that it requires a few things to run, first Windows Server 2008 R2 or Windows 7, the .NET Framework 3.5.1 and of course if you want to manage an AD domain you need Active Directory Web Services (ADWS) installed on at least one domain controller.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;By the way ADWS requires TCP port 9389&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So how in the world does a Windows 7 system know how to find a DC running ADWS?&amp;#160; Well your client running PowerShell will use the normal DC locator process.&amp;#160; First the client will determine which site it is in &lt;em&gt;nltest /dsgetsite&lt;/em&gt; and then it will determine the closest DC &lt;em&gt;nltest /dsgetdc:&amp;lt;FQDN Domain&amp;gt;.&amp;#160; &lt;/em&gt;It is looking at the DC for the following flag:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;DS_WEB_SERVICE_REQUIRED&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;More info on that flag can be found &lt;a href="http://msdn.microsoft.com/en-us/library/ms675983.aspx" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Now what if you don’t have Server 2008 R2 DCs?&amp;#160; With Server 2003 and Server 2008 a problem occurs because the Net Logon service of those domain controllers does not recognize the &lt;em&gt;DS_WEB_SERVICE_REQUIRED&lt;/em&gt; flag.&amp;#160; There are two hotfixes (one for what ever version of AD you are running) available to fix that in those environments.&amp;#160; &lt;a href="http://support.microsoft.com/kb/969429" target="_blank"&gt;Server 2003&lt;/a&gt; and &lt;a href="http://support.microsoft.com/kb/967574" target="_blank"&gt;Server 2008&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After you install this hotfix the AD PowerShell module and Active Directory Administrative Center will be able to locate DCs that have &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=008940c6-0296-4597-be3e-1d24c1cf0dda" target="_blank"&gt;Active Directory Management Gateway Service&lt;/a&gt; installed, similar to Active Directory Web Services (ADWS) on a Windows Server 2008 R2-based computer. &lt;/p&gt;</description></item><item><title>Free Active Directory Virtual Labs</title><link>http://msmvps.com/blogs/ad/archive/2009/12/17/free-active-directory-virtual-labs.aspx</link><pubDate>Thu, 17 Dec 2009 06:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1754396</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;Did I say free?&amp;#160; You bet I did.&amp;#160; Microsoft has done this for quite some time now and is something everyone should take advantage of.&amp;#160; Especially in today’s economy where training budgets are getting slashed.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here are three great labs that you can use to learn all about Server 2008 R2’s Active Directory.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="https://cmg.vlabcenter.com/default.aspx?moduleid=27b950a5-665f-4584-a3d2-75ba4dea983f" target="_blank"&gt;Windows Server 2008 R2: What&amp;#39;s New in Active Directory&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://cmg.vlabcenter.com/default.aspx?moduleid=4e12197c-7b81-4b6a-b089-07d00d0e049c" target="_blank"&gt;Windows Server 2008 R2: Active Directory and Server Manager Remoting&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://cmg.vlabcenter.com/default.aspx?moduleid=b1637ee5-2f02-4df1-a9ee-e58af347fccf" target="_blank"&gt;Windows Server 2008 R2: Active Directory Recycle Bin, PowerShell V2, and Remoting&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Do you have any cool free training resources?&lt;/p&gt;</description></item><item><title>PowerShell Script Center</title><link>http://msmvps.com/blogs/ad/archive/2009/10/14/powershell-script-center.aspx</link><pubDate>Wed, 14 Oct 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1749809</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;I’m sure a lot of you have been playing with PowerShell.&amp;#160; If not you better get on it!!!&amp;#160; I’m not as far along as I wish I was but there is help out there.&amp;#160; One great place is to see what others have done.&amp;#160; Microsoft’s TechNet Scripting Center has a place where you can upload your own scripts and search what others have done.&amp;#160; This is great for a community of learning developers…did I just say developers…ewwwww.&amp;#160; :)&lt;/p&gt;  &lt;p&gt;This &lt;a href="http://gallery.technet.microsoft.com/ScriptCenter/en-us/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=active%20directory&amp;amp;f%5B1%5D.Type=RootCategory&amp;amp;f%5B1%5D.Value=activedirectory&amp;amp;f%5B1%5D.Text=Active%20Directory" target="_blank"&gt;link&lt;/a&gt; provides a shortcut to filter just the Active Directory related scripts.&amp;#160; From here you can find scripts on Computer Accounts, Domains, Groups, Monitoring, OUs, Searching Active Directory, Sites and Subnets and User Accounts!&lt;/p&gt;  &lt;p&gt;If you want to just view all the PowerShell scripts just hit this URL - &lt;a title="http://gallery.technet.microsoft.com/ScriptCenter/en-us" href="http://gallery.technet.microsoft.com/ScriptCenter/en-us"&gt;http://gallery.technet.microsoft.com/ScriptCenter/en-us&lt;/a&gt;.&amp;#160; Here you will scripts on Active Directory, Applications, Backup and System Restore, Databases, Desktop Management, Group Policy, Hardware, Interoperability and Migration, Local Account Management, Logs and monitoring, Messaging &amp;amp; Communication, Multimedia, Networking, Office, Operating System, Other Directory Services, Printing, Remote Desktop Services, Scripting Techniques, Security, Servers, Storage, System Center, Using the Internet and Windows Update.&amp;#160; WOW that is a wealth of info.&lt;/p&gt;  &lt;p&gt;Enjoy and please share if you have any cool ones yourself.&lt;/p&gt;</description></item><item><title>Active Directory Recycle Bin PowerShell Scripts</title><link>http://msmvps.com/blogs/ad/archive/2009/03/31/active-directory-recycle-bin-powershell-scripts.aspx</link><pubDate>Tue, 31 Mar 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1683520</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;I just found out that there is an &lt;a href="http://blogs.msdn.com/adpowershell/default.aspx" target="_blank"&gt;Active Directory PowerShell Blog&lt;/a&gt; run by Microsoft’s AD PowerShell team.&amp;#160; I gathered that info from reading up on Jason’s &lt;a href="http://www.jasonhelmick.com/journal/2009/3/25/active-directory-powershell-blog.html" target="_blank"&gt;post&lt;/a&gt;.&amp;#160; Its amazing how much info you can get from reading other people’s blogs…now on to the regularly scheduled post… &lt;/p&gt;  &lt;p&gt;After writing my article on the &lt;a href="http://msmvps.com/blogs/ad/archive/2009/03/31/taking-out-the-trash.aspx" target="_blank"&gt;AD Recycle Bin&lt;/a&gt; I thought I would include a few PowerShell scripts here that can be used to modify the tombstone lifetime along with the deleted object lifetime.&amp;#160; Remember that the default for both of these is going to be 180 days and will show up as Null if you use LDP to view the attributes.&lt;/p&gt;  &lt;p&gt;PowerShell Script to change the tombstone lifetime of my domain (AdminPrep.Local) to 250 days:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Set-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=AdminPrep,DC=Local” –Partition “CN=Configuration,DC=AdminPrep,DC=Local” –Replace:@{“tombstoneLifetime” = 250}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;PowerShell Script to change the deleted object lifetime:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Set-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=AdminPrep,DC=Local” –Partition “CN=Configuration,DC=AdminPrep,DC=Local” –Replace:@{“msDS-DeletedObjectLifetime” = 250}&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Recycling Active Directory Trash with the AD Recycle Bin</title><link>http://msmvps.com/blogs/ad/archive/2009/03/31/taking-out-the-trash.aspx</link><pubDate>Tue, 31 Mar 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1683475</guid><dc:creator>BrianM</dc:creator><description>&lt;p&gt;Hopefully some of you have been playing with Server 2008 R2 while it has been in &lt;a target="_blank" href="http://www.microsoft.com/windowsserver2008/en/us/R2-Beta.aspx"&gt;Beta&lt;/a&gt;.&amp;nbsp; One of the features I&amp;rsquo;m looking forward to most is the AD Recycle Bin.&amp;nbsp; Yes you heard me correct.&amp;nbsp; We now have an easy method for restoring accidently deleted objects.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;In the past our only recovery method out of the box was to perform an authoritative restore of an object. That method had several issues that always rubbed me the wrong way.&amp;nbsp; First you had to be in Directory Services Restore Mode (DRSM).&amp;nbsp; And ever since Server 2003 we could use tombstone reanimation but that removed most of the non-link-valued attributes.&amp;nbsp; This lead to additional work after the restore. The default tombstone lifetime was 180 days with Server 2003 and 2008.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ad/image_5F00_1E4E4D89.png"&gt;&lt;img height="227" width="377" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ad/image_5F00_thumb_5F00_2FBEAE61.png" alt="image" border="0" title="image" style="border-right:0px;border-top:0px;display:block;float:none;margin-left:auto;border-left:0px;margin-right:auto;border-bottom:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are probably already familiar with tombstones and the garbage collection process.&amp;nbsp; If not read Gil&amp;rsquo;s excellent article on that &lt;a target="_blank" href="http://technet.microsoft.com/en-us/magazine/2007.09.tombstones.aspx"&gt;here&lt;/a&gt;.&amp;nbsp; With Server 2008 R2 you will need to now become aware of Deleted Object and Recycled Object.&amp;nbsp; The first thing to realize here is that the AD Recycle Bin is not enabled by default with Server 2008 R2.&amp;nbsp; The following steps/requirements must first be met:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Raise the Forest Functional Level to Server 2008 R2&lt;/li&gt;
&lt;li&gt;Enable AD Recycle Bin (my example uses PowerShell&amp;hellip;get use to it now) &lt;ol&gt;
&lt;li&gt;Enable-ADOptionalFeature &amp;ndash;Identity &amp;quot;CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=AdminPrep,DC=com&amp;quot; &amp;ndash;Scope ForestOrConfigurationSet &amp;ndash;Target &amp;quot;AdminPrep.com&amp;quot;&lt;/li&gt;
&lt;li&gt;Just make sure to replace AdminPrep with your domain&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now when an object is deleted it is not marked for tombstone it is marked as deleted.&amp;nbsp; It places the object in the Deleted Objects container which is hidden but can be located here &amp;ndash; CN=Deleted Objects.&amp;nbsp; When you want to restore an object there are two methods that I&amp;#39;m aware of, one using PowerShell and the other using LDP.&lt;/p&gt;
&lt;p&gt;Using LDP:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using elevated credentials, open LDP by typing &lt;strong&gt;ldp.exe&lt;/strong&gt; from the Run Dialog box&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Connections&lt;/strong&gt; and select &lt;strong&gt;Connect&lt;/strong&gt; and then go back and select &lt;strong&gt;Bind&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;CN=Deleted Objects&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Find the object you wish to restore and right-click it and select &lt;strong&gt;Modify&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In the Modify dialog box: &lt;ol&gt;
&lt;li&gt;In &lt;strong&gt;Edit Entry Attribute&lt;/strong&gt;, type &lt;strong&gt;isDeleted&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Leave the &lt;strong&gt;Values&lt;/strong&gt; box empty&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Operation&lt;/strong&gt;, click &lt;strong&gt;Delete&lt;/strong&gt;, and then click &lt;strong&gt;Enter&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Edit Entry Attribute&lt;/strong&gt;, type &lt;strong&gt;distinguishedName&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Values&lt;/strong&gt;, type the original distinguished name (also known as DN) of this Active Directory object&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Operation&lt;/strong&gt;, click &lt;strong&gt;Replace&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Make sure that the &lt;strong&gt;Extended&lt;/strong&gt; check box is selected, click &lt;strong&gt;Enter&lt;/strong&gt;, and then click &lt;strong&gt;Run&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To restore an object using PowerShell you must use the &lt;strong&gt;Get-ADObject&lt;/strong&gt; and &lt;strong&gt;Restore-ADObject&lt;/strong&gt; cmdlets.&amp;nbsp; Using PowerShell:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the Active Directory PowerShell command Prompt and use the following syntax: &lt;ol&gt;
&lt;li&gt;Get-ADObject-Filter {String} -IncludeDeletedObjects | Restore-ADObject&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Here is an example of restoring a deleted user account named Brian: &lt;ol&gt;
&lt;li&gt;Get-ADObject -Filter {displayName -eq &amp;quot;Brian&amp;quot;} -IncludeDeletedObjects | Restore-ADObject&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;When restoring multiple items that may be linked (OU or Group that contains Users) you will want to start at the highest level.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;An object can only be restored using those methods if it is still within the Deleted Object Lifetime.&amp;nbsp; The attribute is msDS-deletedObjectLifetime and if you look it up it will have a null value which the default time is 180 days.&lt;/p&gt;
&lt;p&gt;Here is a look at what AD Recycle Bin looks like visually&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ad/image_5F00_2ADBFAA5.png"&gt;&lt;img height="242" width="538" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ad/image_5F00_thumb_5F00_54DBF8CD.png" alt="image" border="0" title="image" style="border-right:0px;border-top:0px;display:block;float:none;margin-left:auto;border-left:0px;margin-right:auto;border-bottom:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>