<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AideXchange &#187; Active Directory</title>
	<atom:link href="http://aidexchange.fr/tag/active-directory/feed" rel="self" type="application/rss+xml" />
	<link>http://aidexchange.fr</link>
	<description>L&#039;administration avec PowerShell.</description>
	<lastBuildDate>Wed, 08 Feb 2012 10:47:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Importer les cmdlets Active Directory 2008</title>
		<link>http://aidexchange.fr/active-directory/importer-les-cmdlets-active-directory-2008.html</link>
		<comments>http://aidexchange.fr/active-directory/importer-les-cmdlets-active-directory-2008.html#comments</comments>
		<pubDate>Wed, 08 Feb 2012 10:47:54 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CmdLets]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[R2]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2802</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Pour importer les module Active Directory sur un serveur Windows 2008 R2. Par exemple sur votre serveur Exchange, vous voulez avoir accès aux cmdlets Active Directory 2008. Il suffit de lancer dans Exchange Management Shell la commande: Import-Module ActiveDirectory Related posts: CmdLets PowerShell pour Active Directory Importer une liste d&#8217;utilisateurs dans Active Directory Poster Active [...]
Related posts:<ol>
<li><a href='http://aidexchange.fr/active-directory/poster-des-commandes-powershell-pour-active-directory.html' rel='bookmark' title='CmdLets PowerShell pour Active Directory'>CmdLets PowerShell pour Active Directory</a></li>
<li><a href='http://aidexchange.fr/active-directory/importer-une-liste-dutilisateurs-dans-active-directory.html' rel='bookmark' title='Importer une liste d&#8217;utilisateurs dans Active Directory'>Importer une liste d&#8217;utilisateurs dans Active Directory</a></li>
<li><a href='http://aidexchange.fr/active-directory/poster-active-directory-2008.html' rel='bookmark' title='Poster Active Directory 2008'>Poster Active Directory 2008</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Pour importer les module Active Directory sur un serveur Windows 2008 R2.<br />
Par exemple sur votre serveur Exchange, vous voulez avoir accès aux cmdlets Active Directory 2008.<br />
Il suffit de lancer dans Exchange Management Shell la commande:</p>

<div class="wp_codebox"><table><tr id="p28022"><td class="code" id="p2802code2"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Import-Module</span> ActiveDirectory</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/active-directory/poster-des-commandes-powershell-pour-active-directory.html' rel='bookmark' title='CmdLets PowerShell pour Active Directory'>CmdLets PowerShell pour Active Directory</a></li>
<li><a href='http://aidexchange.fr/active-directory/importer-une-liste-dutilisateurs-dans-active-directory.html' rel='bookmark' title='Importer une liste d&#8217;utilisateurs dans Active Directory'>Importer une liste d&#8217;utilisateurs dans Active Directory</a></li>
<li><a href='http://aidexchange.fr/active-directory/poster-active-directory-2008.html' rel='bookmark' title='Poster Active Directory 2008'>Poster Active Directory 2008</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/importer-les-cmdlets-active-directory-2008.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CmdLets PowerShell pour Active Directory</title>
		<link>http://aidexchange.fr/active-directory/poster-des-commandes-powershell-pour-active-directory.html</link>
		<comments>http://aidexchange.fr/active-directory/poster-des-commandes-powershell-pour-active-directory.html#comments</comments>
		<pubDate>Tue, 01 Nov 2011 00:15:08 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CmdLets]]></category>
		<category><![CDATA[Commandes]]></category>
		<category><![CDATA[Poster]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2478</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Le poster des commandes Powershell pour Active Directory. Ces CmdLets Active Directory sont disponibles sur Windows Server 2008 R2 mais nécessite Active Directory Management Gateway Service pour les autres versions. Related posts: Importer les cmdlets Active Directory 2008 Poster Active Directory 2008 Retrouver un message dans les logs d&#8217;un HUB.
Related posts:<ol>
<li><a href='http://aidexchange.fr/active-directory/importer-les-cmdlets-active-directory-2008.html' rel='bookmark' title='Importer les cmdlets Active Directory 2008'>Importer les cmdlets Active Directory 2008</a></li>
<li><a href='http://aidexchange.fr/active-directory/poster-active-directory-2008.html' rel='bookmark' title='Poster Active Directory 2008'>Poster Active Directory 2008</a></li>
<li><a href='http://aidexchange.fr/exchange-2007/retrouver-un-message-dans-les-logs-dun-hub.html' rel='bookmark' title='Retrouver un message dans les logs d&#8217;un HUB.'>Retrouver un message dans les logs d&#8217;un HUB.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Le poster des commandes <strong>Powershell</strong> pour <strong>Active Directory</strong>.<br />
Ces CmdLets Active Directory sont disponibles sur Windows Server 2008 R2 mais nécessite Active Directory Management Gateway Service pour les autres versions.</p>
<p style="text-align: center;"><a href="http://aidexchange.fr/wp-content/uploads/2011/10/poster_powershell_active_directory.png" target="_blank"><img class="aligncenter size-full wp-image-433" title="Poster PowerShell Active Directory" src="http://aidexchange.fr/wp-content/uploads/2011/10/poster_powershell_active_directory.png" alt="Poster PowerShell Active Directory" width="640" height="auto" /></a></p>
<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/active-directory/importer-les-cmdlets-active-directory-2008.html' rel='bookmark' title='Importer les cmdlets Active Directory 2008'>Importer les cmdlets Active Directory 2008</a></li>
<li><a href='http://aidexchange.fr/active-directory/poster-active-directory-2008.html' rel='bookmark' title='Poster Active Directory 2008'>Poster Active Directory 2008</a></li>
<li><a href='http://aidexchange.fr/exchange-2007/retrouver-un-message-dans-les-logs-dun-hub.html' rel='bookmark' title='Retrouver un message dans les logs d&#8217;un HUB.'>Retrouver un message dans les logs d&#8217;un HUB.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/poster-des-commandes-powershell-pour-active-directory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Supprimer le sIDHistory d&#8217;un compte</title>
		<link>http://aidexchange.fr/active-directory/supprimer-le-sidhistory.html</link>
		<comments>http://aidexchange.fr/active-directory/supprimer-le-sidhistory.html#comments</comments>
		<pubDate>Wed, 12 Oct 2011 12:59:56 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[SIDHistory]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2339</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Après une migration AD entre deux domaine avec des outils comme ADMT, il est important de supprimer les sIDHistory sur les comptes du domaine cible. Cette opération va permettre également de réduire la taille du Token Kerberos. Get-QADUser &#34;Chuck Norris&#34; &#124; %&#123;Set-QADUser $_ -ObjectAttributes @&#123;sIDHistory=@&#123;delete=$_&#91;'sIDHistory'&#93;&#125;&#125;&#125; Plus d&#8217;infos No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Après une migration AD entre deux domaine avec des outils comme ADMT, il est important de supprimer les sIDHistory sur les comptes du domaine cible.<br />
Cette opération va permettre également de réduire la taille du Token Kerberos.</p>

<div class="wp_codebox"><table><tr id="p23394"><td class="code" id="p2339code4"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-QADUser</span> <span style="color: #800000;">&quot;Chuck Norris&quot;</span> <span style="color: pink;">|</span> <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Set-QADUser</span> <a href="about:blank"><span style="color: #000080;">$_</span></a> <span style="color: pink;">-</span>ObjectAttributes <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>sIDHistory<span style="color: pink;">=@</span><span style="color: #000000;">&#123;</span>delete<span style="color: pink;">=</span><a href="about:blank"><span style="color: #000080;">$_</span></a><span style="color: #000000;">&#91;</span><span style="color: #800000;">'sIDHistory'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://www.shariqsheikh.com/blog/index.php/201012/powershell-how-do-i-clear-sidhistory-attribute/" title="PowerShell : How do I clear sIDhistory attribute ?" target="_blank">Plus d&#8217;infos</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/supprimer-le-sidhistory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Réinitialiser des jeux de réplicas FRS</title>
		<link>http://aidexchange.fr/active-directory/reinitialiser-des-jeux-de-replicas-frs.html</link>
		<comments>http://aidexchange.fr/active-directory/reinitialiser-des-jeux-de-replicas-frs.html#comments</comments>
		<pubDate>Thu, 26 May 2011 10:34:06 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Contrôleur de domaine]]></category>
		<category><![CDATA[FRS]]></category>
		<category><![CDATA[Réplications]]></category>
		<category><![CDATA[SYSVOL]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2263</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Voici une des méthodes pour réinitialiser une réplication FRS notamment le dossier SYSVOL sur un contrôleur de domaine défectueux. Cette méthode de restauration en fait pas autorité et est donc sans risque pour les autres contrôleurs et le domaine. 1- Exécutez &#171;&#160;net stop ntfrs&#160;&#187; dans une commande. 2- Exécutez Regedit 3- Recherchez la sous-clé de [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Voici une des méthodes pour réinitialiser une réplication FRS notamment le dossier SYSVOL sur un contrôleur de domaine défectueux.<br />
Cette méthode de restauration en fait pas autorité et est donc sans risque pour les autres contrôleurs et le domaine.</p>
<p>1- Exécutez &laquo;&nbsp;net stop ntfrs&nbsp;&raquo; dans une commande.<br />
2- Exécutez Regedit<br />
3- Recherchez la sous-clé de Registre suivante : &laquo;&nbsp;HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NtFrs\Parameters\Backup/Restore\Process at Startup&nbsp;&raquo;<br />
4- Modifiez la valeur DWORD &laquo;&nbsp;BurFlags&nbsp;&raquo; en D2 et cliquez sur OK.<br />
5- Exécutez &laquo;&nbsp;net startntfrs&nbsp;&raquo; dans une commande.</p>
<p>Le contenu du dossier SYSVOL va être sauvegardé dans un dossier &laquo;&nbsp;NtFrs_PreExisting___See_EventLog&nbsp;&raquo; à supprimer par la suite.<br />
SYSVOL va ensuite être resynchronisé.</p>
<p><a href="http://support.microsoft.com/kb/290762">Utilisation de la clé de Registre BurFlags pour réinitialiser des jeux de réplicas FRS</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/reinitialiser-des-jeux-de-replicas-frs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gérer les dossiers &#171;&#160;_NTFRS_&#160;&#187; dans SYSVOL</title>
		<link>http://aidexchange.fr/active-directory/renommer-les-dossiers-ntfrs-dans-sysvol.html</link>
		<comments>http://aidexchange.fr/active-directory/renommer-les-dossiers-ntfrs-dans-sysvol.html#comments</comments>
		<pubDate>Fri, 20 May 2011 09:27:44 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[FRS]]></category>
		<category><![CDATA[GPO]]></category>
		<category><![CDATA[Réplications]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2256</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Il est fréquent dans un domaine avec beaucoup de contrôleurs que le service de réplication de fichiers (FRS) modifie le nom de certains dossiers se trouvant dans SYSVOL en ajoutant &#171;&#160;NTFSR_xxxxxxxx&#160;&#187;. Le problème survient lorsque que deux personnes un dossier identique sur deux contrôleurs entre deux réplications. Voici la procédure à suivre pour résoudre le [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Il est fréquent dans un domaine avec beaucoup de contrôleurs que le service de réplication de fichiers (FRS) modifie le nom de certains dossiers se trouvant dans SYSVOL en ajoutant &laquo;&nbsp;NTFSR_xxxxxxxx&nbsp;&raquo;.<br />
Le problème survient lorsque que deux personnes un dossier identique sur deux contrôleurs entre deux réplications.<br />
Voici la procédure à suivre pour résoudre le problème.<br />
<a href="http://support.microsoft.com/kb/328492">Nom de dossier est remplacé par &laquo;&nbsp;FolderName_NTFRS_xxxxxxxx&nbsp;&raquo;</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/renommer-les-dossiers-ntfrs-dans-sysvol.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exporter les comptes d&#8217;ordinateurs</title>
		<link>http://aidexchange.fr/active-directory/exporter-les-comptes-ordinateurs.html</link>
		<comments>http://aidexchange.fr/active-directory/exporter-les-comptes-ordinateurs.html#comments</comments>
		<pubDate>Wed, 18 May 2011 13:41:53 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Comptes]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[Ordinateurs]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2241</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Voici une ligne de commande utile pour exporter la liste des comptes d’ordinateurs d&#8217;une OU en vu de faire un peu de ménage. Get-QADComputer -IncludeAllProperties -SearchRoot domain.local\Paris -Sizelimit 0 &#124; Select-Object cn,OSName,OSServicePack,pwdlastset,ParentContainer &#124; Export-Csv -Path Paris_Computers_List.csv No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Voici une ligne de commande utile pour exporter la liste des comptes d’ordinateurs d&#8217;une OU en vu de faire un peu de ménage.</p>

<div class="wp_codebox"><table><tr id="p22416"><td class="code" id="p2241code6"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-QADComputer</span> <span style="color: pink;">-</span>IncludeAllProperties <span style="color: pink;">-</span>SearchRoot domain.local\Paris <span style="color: pink;">-</span>Sizelimit <span style="color: #804000;">0</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Select-Object</span> cn<span style="color: pink;">,</span>OSName<span style="color: pink;">,</span>OSServicePack<span style="color: pink;">,</span>pwdlastset<span style="color: pink;">,</span>ParentContainer <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Export-Csv</span> <span style="color: #008080; font-style: italic;">-Path</span> Paris_Computers_List.csv</pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/exporter-les-comptes-ordinateurs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lister les relations d&#8217;approbations</title>
		<link>http://aidexchange.fr/active-directory/lister-les-relations-dapprobations.html</link>
		<comments>http://aidexchange.fr/active-directory/lister-les-relations-dapprobations.html#comments</comments>
		<pubDate>Mon, 07 Feb 2011 15:51:17 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Relation d'approbation]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2084</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Ce script vous permet de liste rapidement les relations d&#8217;approbations en place sur votre domaine. $DomainInfo = &#91;System.DirectoryServices.ActiveDirectory.Domain&#93;::GetCurrentDomain&#40;&#41; $RelationShip = $DomainInfo.GetAllTrustRelationships&#40;&#41; $RelationShip No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Ce script vous permet de liste rapidement les relations d&#8217;approbations en place sur votre domaine.</p>

<div class="wp_codebox"><table><tr id="p20848"><td class="code" id="p2084code8"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$DomainInfo</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>System.DirectoryServices.ActiveDirectory.Domain<span style="color: #000000;">&#93;</span>::GetCurrentDomain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$RelationShip</span> <span style="color: pink;">=</span> <span style="color: #800080;">$DomainInfo</span>.GetAllTrustRelationships<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
$RelationShip</pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/lister-les-relations-dapprobations.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rechercher des OU dans le domaine</title>
		<link>http://aidexchange.fr/active-directory/rechercher-des-ou-dans-le-domaine.html</link>
		<comments>http://aidexchange.fr/active-directory/rechercher-des-ou-dans-le-domaine.html#comments</comments>
		<pubDate>Mon, 31 Jan 2011 22:35:35 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Recherche]]></category>
		<category><![CDATA[Unité d'organisation]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2082</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Comment lister toutes les Unités d&#8217;Organisation d&#8217;un domaine contenant le mot &#171;&#160;Users&#160;&#187;. $search = &#91;System.DirectoryServices.DirectorySearcher&#93;&#40;&#91;adsi&#93;&#34;&#34;&#41; $search.Filter = &#34;(objectClass=organizationalUnit)&#34; $search.Findall&#40;&#41; &#124; Where-Object &#123;$_.properties.distinguishedname -match &#34;Users&#34; &#125; No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Comment lister toutes les Unités d&#8217;Organisation d&#8217;un domaine contenant le mot &laquo;&nbsp;Users&nbsp;&raquo;.</p>

<div class="wp_codebox"><table><tr id="p208210"><td class="code" id="p2082code10"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$search</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>System.DirectoryServices.DirectorySearcher<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>adsi<span style="color: #000000;">&#93;</span><span style="color: #800000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> 
<span style="color: #800080;">$search</span>.<span style="color: #0000FF;">Filter</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;(objectClass=organizationalUnit)&quot;</span> 
<span style="color: #800080;">$search</span>.Findall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Where-Object</span> <span style="color: #000000;">&#123;</span><a href="about:blank"><span style="color: #000080;">$_</span></a>.properties.distinguishedname <span style="color: #FF0000;">-match</span> <span style="color: #800000;">&quot;Users&quot;</span> <span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/rechercher-des-ou-dans-le-domaine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lister les Licence Terminal Server</title>
		<link>http://aidexchange.fr/active-directory/lister-les-licence-terminal-server.html</link>
		<comments>http://aidexchange.fr/active-directory/lister-les-licence-terminal-server.html#comments</comments>
		<pubDate>Wed, 05 Jan 2011 21:19:29 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Licences]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Terminal Server]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2026</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Ce script m&#8217;a permit de lister tous les serveurs gestionnaires de licences terminal server dans le domaine. LSVIEW.EXE permet de faire cette recherche mais ne fouille pas recoins lointains d&#8217;un domaine important. Le script ci-dessous est plus agressif, il vérifie la présence du service &#171;&#160;TermServLicensing&#160;&#187; sur tous les Windows Server du domaine. &#160; $Input = [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Ce script m&#8217;a permit de lister tous les serveurs gestionnaires de licences terminal server dans le domaine.<br />
LSVIEW.EXE permet de faire cette recherche mais ne fouille pas recoins lointains d&#8217;un domaine important.<br />
Le script ci-dessous est plus agressif, il vérifie la présence du service &laquo;&nbsp;TermServLicensing&nbsp;&raquo; sur tous les Windows Server du domaine.</p>

<div class="wp_codebox"><table><tr id="p202612"><td class="code" id="p2026code12"><pre class="powershell" style="font-family:monospace;">&nbsp;
<a href="about:blank"><span style="color: #000080;">$Input</span></a> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-QADComputer</span> <span style="color: pink;">-</span>SizeLimit <span style="color: #804000;">0</span> <span style="color: pink;">|</span> <span style="color: #0000FF;">where</span> <span style="color: #000000;">&#123;</span><a href="about:blank"><span style="color: #000080;">$_</span></a>.OSName <span style="color: #FF0000;">-match</span> <span style="color: #800000;">&quot;Windows Server&quot;</span> <span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$expfileok</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Item</span> <span style="color: #008080; font-style: italic;">-ItemType</span> file <span style="color: #008080; font-style: italic;">-Path</span> .\TermServLicensing.csv <span style="color: #008080; font-style: italic;">-Force</span>
<span style="color: #008080; font-weight: bold;">Add-Content</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$expfileok</span> <span style="color: #008080; font-style: italic;">-Value</span> <span style="color: #800000;">&quot;Name,OK&quot;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$server</span> <span style="color: #0000FF;">in</span> <a href="about:blank"><span style="color: #000080;">$Input</span></a><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #800080;">$version</span> <span style="color: pink;">=</span> <span style="color: #800080;">$null</span>
<span style="color: #800080;">$version</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-WmiObject</span> Win32_OperatingSystem <span style="color: #008080; font-style: italic;">-ComputerName</span> <span style="color: #800080;">$server</span>.name <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue
&nbsp;
	<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span> <span style="color: #800080;">$version</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800080;">$server</span>.name <span style="color: #800000;">&quot; Inaccessible.&quot;</span> <span style="color: #008080; font-style: italic;">-Separator</span> <span style="color: #800000;">&quot;,&quot;</span>  <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Red
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0000FF;">Else</span>
	<span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #800080;">$Service</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-Service</span> <span style="color: #008080; font-style: italic;">-ComputerName</span> <span style="color: #800080;">$server</span>.name <span style="color: #008080; font-style: italic;">-Name</span> <span style="color: #800000;">&quot;TermServLicensing&quot;</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue
		<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Service</span>.name <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;TermServLicensing&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
		<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800080;">$server</span>.name <span style="color: #800000;">&quot;OK&quot;</span><span style="color: #008080; font-style: italic;">-Separator</span> <span style="color: #800000;">&quot;,&quot;</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Green
		<span style="color: #008080; font-weight: bold;">Add-Content</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$expfileok</span> <span style="color: #008080; font-style: italic;">-Value</span> <span style="color: #800000;">&quot;$($server.name),$(&quot;</span>OK<span style="color: #800000;">&quot;)&quot;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>	
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/lister-les-licence-terminal-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Déplacer les membres d&#8217;un groupe</title>
		<link>http://aidexchange.fr/active-directory/deplacer-les-membres-groupe.html</link>
		<comments>http://aidexchange.fr/active-directory/deplacer-les-membres-groupe.html#comments</comments>
		<pubDate>Mon, 29 Nov 2010 21:27:10 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Groupes]]></category>
		<category><![CDATA[Membres]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=1949</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/>Déplacez les membres d&#8217;un groupe vers un autre groupe Active Directory. $groups = Read-Host &#34;Entrez le nom du groupe source&#34; $groupt = Read-Host &#34;Entrez le nom du groupe cible&#34; $members = Get-QADGroupMember -Identity $groups Foreach &#40; $member in $members&#41; &#123; if &#40; $member -ne $null&#41; &#123; Add-QADGroupMember -Identity $groupt -Member $member.dn Remove-QADGroupMember -Identity $groups -Member [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Active_Directory.png" width="70" height="70" alt="" title="Active Directory" /><br/><p>Déplacez les membres d&#8217;un groupe vers un autre groupe Active Directory.</p>

<div class="wp_codebox"><table><tr id="p194914"><td class="code" id="p1949code14"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$groups</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #800000;">&quot;Entrez le nom du groupe source&quot;</span>
<span style="color: #800080;">$groupt</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #800000;">&quot;Entrez le nom du groupe cible&quot;</span>
<span style="color: #800080;">$members</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-QADGroupMember</span> <span style="color: #008080; font-style: italic;">-Identity</span> <span style="color: #800080;">$groups</span>
<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span> <span style="color: #800080;">$member</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$members</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span> <span style="color: #800080;">$member</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Add-QADGroupMember</span> <span style="color: #008080; font-style: italic;">-Identity</span> <span style="color: #800080;">$groupt</span> <span style="color: #008080; font-style: italic;">-Member</span> <span style="color: #800080;">$member</span>.dn
<span style="color: #008080; font-weight: bold;">Remove-QADGroupMember</span> <span style="color: #008080; font-style: italic;">-Identity</span> <span style="color: #800080;">$groups</span> <span style="color: #008080; font-style: italic;">-Member</span> <span style="color: #800080;">$member</span>.dn
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/active-directory/deplacer-les-membres-groupe.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

