<?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; Powershell</title>
	<atom:link href="http://aidexchange.fr/powershell/feed" rel="self" type="application/rss+xml" />
	<link>http://aidexchange.fr</link>
	<description>L&#039;administration avec PowerShell.</description>
	<lastBuildDate>Mon, 21 May 2012 20:19:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Module PowerShell pour gérer le DHCP</title>
		<link>http://aidexchange.fr/powershell/module-powershell-pour-grer-le-dhcp.html</link>
		<comments>http://aidexchange.fr/powershell/module-powershell-pour-grer-le-dhcp.html#comments</comments>
		<pubDate>Thu, 10 May 2012 12:41:12 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[CmdLets]]></category>
		<category><![CDATA[Commandes]]></category>
		<category><![CDATA[DHCP]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2923</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Voici un module PowerShell a ajouter pour obtenir les commandes supplémentaires pour gérer vos serveurs DHCP. PowerShell Module for DHCP Vous aurez alors accès à 24 cmdlets supplémentaires. Add-DHCPExclusionRange Add-DHCPIPRange Disable-DHCPScope Enable-DHCPScope Get-DHCPOption Get-DHCPOptionDefinitions Get-DHCPReservation Get-DHCPScope Get-DHCPServer Get-DHCPStatistics New-DHCPOptionDefinition New-DHCPReservation New-DHCPScope Remove-DHCPExclusionRange Remove-DHCPIPRange Remove-DHCPOption Remove-DHCPOptionDefinition Remove-DHCPReservation Remove-DHCPScope Set-DHCPConflictDetectionAttempts Set-DHCPOption Set-DHCPScopeDescription Set-DHCPScopeLease Set-DHCPScopeName Ces commandes utilisent [...]
Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/lister-les-tendues-dhcp-dun-serveur.html' rel='bookmark' title='Lister les étendues DHCP d&#8217;un serveur'>Lister les étendues DHCP d&#8217;un serveur</a></li>
<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/powershell/utiliser-internet-explorer-avec-powershell.html' rel='bookmark' title='Utiliser Internet Explorer avec Powershell'>Utiliser Internet Explorer avec Powershell</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Voici un module PowerShell a ajouter pour obtenir les commandes supplémentaires pour gérer vos serveurs DHCP.</p>
<p style="padding-left: 30px;"><a title="Module PowerShell pour DHCP" href="http://gallery.technet.microsoft.com/scriptcenter/05b1d766-25a6-45cd-a0f1-8741ff6c04ec">PowerShell Module for DHCP</a></p>
<p>Vous aurez alors accès à 24 cmdlets supplémentaires.</p>
<p style="padding-left: 30px;">Add-DHCPExclusionRange<br />
Add-DHCPIPRange<br />
Disable-DHCPScope<br />
Enable-DHCPScope<br />
Get-DHCPOption<br />
Get-DHCPOptionDefinitions<br />
Get-DHCPReservation<br />
Get-DHCPScope<br />
Get-DHCPServer<br />
Get-DHCPStatistics<br />
New-DHCPOptionDefinition<br />
New-DHCPReservation<br />
New-DHCPScope<br />
Remove-DHCPExclusionRange<br />
Remove-DHCPIPRange<br />
Remove-DHCPOption<br />
Remove-DHCPOptionDefinition<br />
Remove-DHCPReservation<br />
Remove-DHCPScope<br />
Set-DHCPConflictDetectionAttempts<br />
Set-DHCPOption<br />
Set-DHCPScopeDescription<br />
Set-DHCPScopeLease<br />
Set-DHCPScopeName</p>
<p>Ces commandes utilisent netsh, pour simplifier les taches d&#8217;administration sur les serveur DCHP.</p>
<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/lister-les-tendues-dhcp-dun-serveur.html' rel='bookmark' title='Lister les étendues DHCP d&#8217;un serveur'>Lister les étendues DHCP d&#8217;un serveur</a></li>
<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/powershell/utiliser-internet-explorer-avec-powershell.html' rel='bookmark' title='Utiliser Internet Explorer avec Powershell'>Utiliser Internet Explorer avec Powershell</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/module-powershell-pour-grer-le-dhcp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lister les étendues DHCP d&#8217;un serveur</title>
		<link>http://aidexchange.fr/powershell/lister-les-tendues-dhcp-dun-serveur.html</link>
		<comments>http://aidexchange.fr/powershell/lister-les-tendues-dhcp-dun-serveur.html#comments</comments>
		<pubDate>Thu, 10 May 2012 12:14:36 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[Outils]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2920</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Netsh est un utilitaire en ligne de comande qui va vous permettre de gérer le DHCP Client et Serveur. Par exemple sur un serveur, la commande suivant permet d&#8217;afficher toutes les étendues. netsh dhcp server \\SERVERNAME show scope Ces commandes s&#8217;intègre très bien dans vos scripts PowerShell. Vue d&#8217;ensemble des commandes Netsh No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Netsh est un utilitaire en ligne de comande qui va vous permettre de gérer le DHCP Client et Serveur.<br />
Par exemple sur un serveur, la commande suivant permet d&#8217;afficher toutes les étendues.</p>

<div class="wp_codebox"><table><tr id="p29202"><td class="code" id="p2920code2"><pre class="cmd" style="font-family:monospace;">netsh dhcp server \\SERVERNAME show scope</pre></td></tr></table></div>

<p>Ces commandes s&#8217;intègre très bien dans vos scripts PowerShell.<br />
<a href="http://technet.microsoft.com/fr-fr/library/cc778925(v=ws.10).aspx" title="Gérer DHCP avec Netsh">Vue d&#8217;ensemble des commandes Netsh</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/lister-les-tendues-dhcp-dun-serveur.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faire un ping avec PowerShell</title>
		<link>http://aidexchange.fr/powershell/faire-ping-avec-powershell.html</link>
		<comments>http://aidexchange.fr/powershell/faire-ping-avec-powershell.html#comments</comments>
		<pubDate>Thu, 10 May 2012 12:01:04 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Ping]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2917</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Faire un ping avec PowerShell. $ping = new-object System.Net.Networkinformation.Ping $ping.send&#40;&#34;servername&#34;&#41; Utile pour vérifier que la machine est en ligne avant de lancer un tache distante. Related posts: Pinger un ordinateur avec un script Powershell. Caractères d&#8217;échappement avec Powershell. Transfert vers un serveur FTP avec Powershell
Related posts:<ol>
<li><a href='http://aidexchange.fr/windows/pinger-ordinateur.html' rel='bookmark' title='Pinger un ordinateur avec un script Powershell.'>Pinger un ordinateur avec un script Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/caracteres-echappement-powershell.html' rel='bookmark' title='Caractères d&#8217;échappement avec Powershell.'>Caractères d&#8217;échappement avec Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/transfert-vers-serveur-ftp-avec-powershell.html' rel='bookmark' title='Transfert vers un serveur FTP avec Powershell'>Transfert vers un serveur FTP avec Powershell</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Faire un ping avec PowerShell.</p>

<div class="wp_codebox"><table><tr id="p29174"><td class="code" id="p2917code4"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$ping</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> System.Net.Networkinformation.Ping 
<span style="color: #800080;">$ping</span>.send<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;servername&quot;</span><span style="color: #000000;">&#41;</span></pre></td></tr></table></div>

<p>Utile pour vérifier que la machine est en ligne avant de lancer un tache distante.</p>
<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/windows/pinger-ordinateur.html' rel='bookmark' title='Pinger un ordinateur avec un script Powershell.'>Pinger un ordinateur avec un script Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/caracteres-echappement-powershell.html' rel='bookmark' title='Caractères d&#8217;échappement avec Powershell.'>Caractères d&#8217;échappement avec Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/transfert-vers-serveur-ftp-avec-powershell.html' rel='bookmark' title='Transfert vers un serveur FTP avec Powershell'>Transfert vers un serveur FTP avec Powershell</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/faire-ping-avec-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NsLookup avec Powershell</title>
		<link>http://aidexchange.fr/powershell/nslookup-avec-powershell.html</link>
		<comments>http://aidexchange.fr/powershell/nslookup-avec-powershell.html#comments</comments>
		<pubDate>Thu, 10 May 2012 11:56:26 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[NsLookup]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2913</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Voici comment faire un NsLookup d&#8217;une plage IP avec PowerShell. 1..255 &#124; % &#123; &#91;System.Net.Dns&#93;::GetHostByAddress&#40;&#34;192.168.1.$_&#34;&#41; &#125; 2&#62; Out-Null &#124; ft Cela vous permet de récupérer le HostName, les Aliases pour chaque IP de la plage d&#8217;adresses. Related posts: Les dimensions d&#8217;une images avec Powershell Récuperer votre login courant avec Powershell. Utiliser Internet Explorer avec Powershell
Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/les-dimension-d-une-images-avec-powershell.html' rel='bookmark' title='Les dimensions d&#8217;une images avec Powershell'>Les dimensions d&#8217;une images avec Powershell</a></li>
<li><a href='http://aidexchange.fr/powershell/recuperer-votre-login-courant-avec-powershell.html' rel='bookmark' title='Récuperer votre login courant avec Powershell.'>Récuperer votre login courant avec Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/utiliser-internet-explorer-avec-powershell.html' rel='bookmark' title='Utiliser Internet Explorer avec Powershell'>Utiliser Internet Explorer avec Powershell</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Voici comment faire un NsLookup d&#8217;une plage IP avec PowerShell.</p>

<div class="wp_codebox"><table><tr id="p29136"><td class="code" id="p2913code6"><pre class="powershell" style="font-family:monospace;"><span style="color: #804000;">1</span>..255 <span style="color: pink;">|</span> <span style="color: pink;">%</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#91;</span>System.Net.Dns<span style="color: #000000;">&#93;</span>::GetHostByAddress<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;192.168.1.$_&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #804000;">2</span><span style="color: pink;">&gt;</span> <span style="color: #008080; font-weight: bold;">Out-Null</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ft</span></pre></td></tr></table></div>

<p>Cela vous permet de récupérer le HostName, les Aliases pour chaque IP de la plage d&#8217;adresses.</p>
<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/les-dimension-d-une-images-avec-powershell.html' rel='bookmark' title='Les dimensions d&#8217;une images avec Powershell'>Les dimensions d&#8217;une images avec Powershell</a></li>
<li><a href='http://aidexchange.fr/powershell/recuperer-votre-login-courant-avec-powershell.html' rel='bookmark' title='Récuperer votre login courant avec Powershell.'>Récuperer votre login courant avec Powershell.</a></li>
<li><a href='http://aidexchange.fr/powershell/utiliser-internet-explorer-avec-powershell.html' rel='bookmark' title='Utiliser Internet Explorer avec Powershell'>Utiliser Internet Explorer avec Powershell</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/nslookup-avec-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choisir pour qui voter avec PowerShell</title>
		<link>http://aidexchange.fr/powershell/choisir-pour-qui-voter-avec-powershell.html</link>
		<comments>http://aidexchange.fr/powershell/choisir-pour-qui-voter-avec-powershell.html#comments</comments>
		<pubDate>Fri, 27 Apr 2012 09:54:57 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Election Présidentielle]]></category>
		<category><![CDATA[Hollande]]></category>
		<category><![CDATA[Indécis]]></category>
		<category><![CDATA[Sarkozy]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2908</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Voici une ligne de commande PowerShell très utile aux indécis pour choisir pour qui voter au second tour de l&#8217;élection présidentielle. Get-Random &#34;François Hollande&#34;,&#34;Nicolas Sarkozy&#34; No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Voici une ligne de commande PowerShell très utile aux indécis pour choisir pour qui voter au second tour de l&#8217;élection présidentielle.</p>

<div class="wp_codebox"><table><tr id="p29088"><td class="code" id="p2908code8"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-Random</span> <span style="color: #800000;">&quot;François Hollande&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;Nicolas Sarkozy&quot;</span></pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/choisir-pour-qui-voter-avec-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combien de temps avant les vacances?</title>
		<link>http://aidexchange.fr/powershell/combien-de-temps-avant-les-vacances.html</link>
		<comments>http://aidexchange.fr/powershell/combien-de-temps-avant-les-vacances.html#comments</comments>
		<pubDate>Fri, 27 Apr 2012 09:41:20 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Décompte]]></category>
		<category><![CDATA[Temps]]></category>
		<category><![CDATA[Vacances]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2905</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Un petit script qui décompte les temps qui reste avant les vacances en PowerShell. $Timespan = New-TimeSpan -Start &#40;get-date&#41; -End &#40;Get-Date -Day 27 -Month 7 -Year 2012 -Hour 18 -Minute 30&#41; $MsgBox = New-Object -ComObject wscript.shell $MsgBox.Popup&#40;&#34;Il reste $($timespan.days) jours, $($timespan.hours) heures, et $($timespan.minutes) minutes avant les vacances!&#34;&#41; Related posts: Depuis combien de temps est [...]
Related posts:<ol>
<li><a href='http://aidexchange.fr/windows/depuis-combien-de-temps-est-demarre-un-serveur.html' rel='bookmark' title='Depuis combien de temps est démarré un serveur.'>Depuis combien de temps est démarré un serveur.</a></li>
<li><a href='http://aidexchange.fr/powershell/voyager-dans-le-temps.html' rel='bookmark' title='Voyager dans le temps.'>Voyager dans le temps.</a></li>
<li><a href='http://aidexchange.fr/divers/674.html' rel='bookmark' title='Vacances'>Vacances</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Un petit script qui décompte les temps qui reste avant les vacances en PowerShell.</p>

<div class="wp_codebox"><table><tr id="p290510"><td class="code" id="p2905code10"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$Timespan</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-TimeSpan</span> <span style="color: #008080; font-style: italic;">-Start</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">get-date</span><span style="color: #000000;">&#41;</span> <span style="color: #008080; font-style: italic;">-End</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Get-Date</span> <span style="color: #008080; font-style: italic;">-Day</span> <span style="color: #804000;">27</span> <span style="color: #008080; font-style: italic;">-Month</span> <span style="color: #804000;">7</span> <span style="color: #008080; font-style: italic;">-Year</span> <span style="color: #804000;">2012</span> <span style="color: #008080; font-style: italic;">-Hour</span> <span style="color: #804000;">18</span> <span style="color: #008080; font-style: italic;">-Minute</span> <span style="color: #804000;">30</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$MsgBox</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> <span style="color: #008080; font-style: italic;">-ComObject</span> wscript.shell
<span style="color: #800080;">$MsgBox</span>.Popup<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Il reste $($timespan.days) jours, $($timespan.hours) heures, et $($timespan.minutes) minutes avant les vacances!&quot;</span><span style="color: #000000;">&#41;</span></pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/windows/depuis-combien-de-temps-est-demarre-un-serveur.html' rel='bookmark' title='Depuis combien de temps est démarré un serveur.'>Depuis combien de temps est démarré un serveur.</a></li>
<li><a href='http://aidexchange.fr/powershell/voyager-dans-le-temps.html' rel='bookmark' title='Voyager dans le temps.'>Voyager dans le temps.</a></li>
<li><a href='http://aidexchange.fr/divers/674.html' rel='bookmark' title='Vacances'>Vacances</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/combien-de-temps-avant-les-vacances.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remplacer une chaîne dans un fichier texte</title>
		<link>http://aidexchange.fr/powershell/rechercher-et-remplacer-une-chaine-dans-un-fichier-texte.html</link>
		<comments>http://aidexchange.fr/powershell/rechercher-et-remplacer-une-chaine-dans-un-fichier-texte.html#comments</comments>
		<pubDate>Thu, 22 Mar 2012 21:59:30 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Chaine]]></category>
		<category><![CDATA[rechercher]]></category>
		<category><![CDATA[remplacer]]></category>
		<category><![CDATA[Texte]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2900</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Ce script permet de rechercher et remplacer une chaîne de caractère par une autre dans l&#8217;ensemble d&#8217;un fichier texte. $content = Get-Content &#34;.\file.txt&#34; &#124; foreach &#123; $_ -replace &#34;hello&#34;,&#34;bonjour&#34; &#125; Set-Content -Path &#34;.\file.txt&#34; -Value $content Related posts: Rechercher du texte dans une chaîne ou un fichier Modifier le contenu d&#8217;un fichier texte. Faire un filtre [...]
Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/rechercher-du-texte-dans-une-chane-ou-fichier.html' rel='bookmark' title='Rechercher du texte dans une chaîne ou un fichier'>Rechercher du texte dans une chaîne ou un fichier</a></li>
<li><a href='http://aidexchange.fr/powershell/modifier-contenu-fichier-texte.html' rel='bookmark' title='Modifier le contenu d&#8217;un fichier texte.'>Modifier le contenu d&#8217;un fichier texte.</a></li>
<li><a href='http://aidexchange.fr/powershell/faire-un-filtre-sur-une-liste-de-boite-dans-un-fichier.html' rel='bookmark' title='Faire un filtre sur une liste de boite dans un fichier.'>Faire un filtre sur une liste de boite dans un fichier.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Ce script permet de rechercher et remplacer une chaîne de caractère par une autre dans l&#8217;ensemble d&#8217;un fichier texte.</p>

<div class="wp_codebox"><table><tr id="p290012"><td class="code" id="p2900code12"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$content</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-Content</span> <span style="color: #800000;">&quot;.\file.txt&quot;</span> <span style="color: pink;">|</span> <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#123;</span> <a href="about:blank"><span style="color: #000080;">$_</span></a> <span style="color: #FF0000;">-replace</span> <span style="color: #800000;">&quot;hello&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;bonjour&quot;</span> <span style="color: #000000;">&#125;</span> 
<span style="color: #008080; font-weight: bold;">Set-Content</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800000;">&quot;.\file.txt&quot;</span> <span style="color: #008080; font-style: italic;">-Value</span> $content</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/powershell/rechercher-du-texte-dans-une-chane-ou-fichier.html' rel='bookmark' title='Rechercher du texte dans une chaîne ou un fichier'>Rechercher du texte dans une chaîne ou un fichier</a></li>
<li><a href='http://aidexchange.fr/powershell/modifier-contenu-fichier-texte.html' rel='bookmark' title='Modifier le contenu d&#8217;un fichier texte.'>Modifier le contenu d&#8217;un fichier texte.</a></li>
<li><a href='http://aidexchange.fr/powershell/faire-un-filtre-sur-une-liste-de-boite-dans-un-fichier.html' rel='bookmark' title='Faire un filtre sur une liste de boite dans un fichier.'>Faire un filtre sur une liste de boite dans un fichier.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/rechercher-et-remplacer-une-chaine-dans-un-fichier-texte.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lancer l’édition d&#8217;un fichier depuis PowerShell</title>
		<link>http://aidexchange.fr/powershell/lancer-edition-un-fichier-depuis-powershell.html</link>
		<comments>http://aidexchange.fr/powershell/lancer-edition-un-fichier-depuis-powershell.html#comments</comments>
		<pubDate>Tue, 28 Feb 2012 09:38:30 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Lancer]]></category>
		<category><![CDATA[PS1]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2812</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Voici comment ouvrir un fichier de script PowerShell en commande directement depuis la console. Voici déjà deux méthode pour lancer un application depuis PowerShell, ici PowerGUI Script Editor: Invoke-Item 'C:\Program Files\PowerGUI\ScriptEditor.exe' ou &#38; 'C:\Program Files\PowerGUI\ScriptEditor.exe' Pour ouvrir directement le fichier de script: &#38; 'C:\Program Files\PowerGUI\ScriptEditor.exe' .\monscript.ps1 Si je veux éviter de taper à chaque fois [...]
Related posts:<ol>
<li><a href='http://aidexchange.fr/exchange-2007/deplacer-les-files-dattentes-sur-un-hub.html' rel='bookmark' title='Déplacer les files d&#8217;attentes sur un HUB.'>Déplacer les files d&#8217;attentes sur un HUB.</a></li>
<li><a href='http://aidexchange.fr/powershell/modifier-contenu-fichier-texte.html' rel='bookmark' title='Modifier le contenu d&#8217;un fichier texte.'>Modifier le contenu d&#8217;un fichier texte.</a></li>
<li><a href='http://aidexchange.fr/powershell/ecrire-le-resultat-dun-script-dans-un-fichier.html' rel='bookmark' title='Ecrire le résultat d&#8217;un script dans un fichier.'>Ecrire le résultat d&#8217;un script dans un fichier.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Voici comment ouvrir un fichier de script PowerShell en commande directement depuis la console.<br />
Voici déjà deux méthode pour lancer un application depuis PowerShell, ici PowerGUI Script Editor:</p>

<div class="wp_codebox"><table><tr id="p281217"><td class="code" id="p2812code17"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Invoke-Item</span> <span style="color: #800000;">'C:\Program Files\PowerGUI\ScriptEditor.exe'</span></pre></td></tr></table></div>

<p>ou</p>

<div class="wp_codebox"><table><tr id="p281218"><td class="code" id="p2812code18"><pre class="powershell" style="font-family:monospace;"><span style="color: pink;">&amp;</span> <span style="color: #800000;">'C:\Program Files\PowerGUI\ScriptEditor.exe'</span></pre></td></tr></table></div>

<p>Pour ouvrir directement le fichier de script:</p>

<div class="wp_codebox"><table><tr id="p281219"><td class="code" id="p2812code19"><pre class="powershell" style="font-family:monospace;"><span style="color: pink;">&amp;</span> <span style="color: #800000;">'C:\Program Files\PowerGUI\ScriptEditor.exe'</span> .\monscript.ps1</pre></td></tr></table></div>

<p>Si je veux éviter de taper à chaque fois le chemin de l&#8217;applications:</p>

<div class="wp_codebox"><table><tr id="p281220"><td class="code" id="p2812code20"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$notepadp</span> <span style="color: pink;">=</span> <span style="color: #800000;">'C:\Program Files\PowerGUI\ScriptEditor.exe'</span>
<span style="color: pink;">&amp;</span> <span style="color: #800080;">$notepadp</span> .\monscript.ps1</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://aidexchange.fr/exchange-2007/deplacer-les-files-dattentes-sur-un-hub.html' rel='bookmark' title='Déplacer les files d&#8217;attentes sur un HUB.'>Déplacer les files d&#8217;attentes sur un HUB.</a></li>
<li><a href='http://aidexchange.fr/powershell/modifier-contenu-fichier-texte.html' rel='bookmark' title='Modifier le contenu d&#8217;un fichier texte.'>Modifier le contenu d&#8217;un fichier texte.</a></li>
<li><a href='http://aidexchange.fr/powershell/ecrire-le-resultat-dun-script-dans-un-fichier.html' rel='bookmark' title='Ecrire le résultat d&#8217;un script dans un fichier.'>Ecrire le résultat d&#8217;un script dans un fichier.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/lancer-edition-un-fichier-depuis-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activer l’éditeur PowerShell sur Windows 2008 R2</title>
		<link>http://aidexchange.fr/powershell/activer-editeur-powershell-sur-windows-2008-r2.html</link>
		<comments>http://aidexchange.fr/powershell/activer-editeur-powershell-sur-windows-2008-r2.html#comments</comments>
		<pubDate>Thu, 05 Jan 2012 18:35:18 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Edition]]></category>
		<category><![CDATA[ISE]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2781</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Par défaut, l’éditeur PowerShell ISE sur Windows 2008 R2 ou Seven qui possèdent nativement PowerShell V2 n&#8217;est pas accessible. Il faut l&#8217;installer. Rien à télécharger, tout est déja disponible en local. Il suffit juste de lancer la commande. Import-Module ServerManager;Add-WindowsFeature PowerShell-ISE Et comme par magie Powershell ISE apparait dans le menu démarrer. &#160; &#160; Il [...]
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-windows-2008-r2.html' rel='bookmark' title='Poster Windows 2008 R2'>Poster Windows 2008 R2</a></li>
<li><a href='http://aidexchange.fr/powershell/module-powershell-pour-grer-le-dhcp.html' rel='bookmark' title='Module PowerShell pour gérer le DHCP'>Module PowerShell pour gérer le DHCP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Par défaut, l’éditeur PowerShell ISE sur Windows 2008 R2 ou Seven qui possèdent nativement PowerShell V2 n&#8217;est pas accessible.<br />
Il faut l&#8217;installer. Rien à télécharger, tout est déja disponible en local. Il suffit juste de lancer la commande.</p>

<div class="wp_codebox"><table><tr id="p278122"><td class="code" id="p2781code22"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Import-Module</span> ServerManager;Add<span style="color: pink;">-</span>WindowsFeature PowerShell<span style="color: pink;">-</span>ISE</pre></td></tr></table></div>

<p>Et comme par magie Powershell ISE apparait dans le menu démarrer.<br />
&nbsp;<br />
<a href="http://img1.aidexchange.fr/wp-content/uploads/2012/01/PowerShell_ISE.png"><img class="aligncenter size-medium wp-image-2783" title="PowerShell_ISE" src="http://img1.aidexchange.fr/wp-content/uploads/2012/01/PowerShell_ISE-224x300.png" alt="" width="224" height="300" /></a></p>
<p>&nbsp;</p>
<p>Il vous permettra de faire en local vos petites modifications de script.<br />
&nbsp;<br />
<a href="http://img2.aidexchange.fr/wp-content/uploads/2012/01/PowerShell_ISE_Home1.png"><img class="aligncenter size-full wp-image-2786" title="PowerShell_ISE_Home" src="http://img2.aidexchange.fr/wp-content/uploads/2012/01/PowerShell_ISE_Home1.png" alt="" width="670" height="auto" /></a><br />
&nbsp;<br />
Pour les autres versions de Windows il faudra passer par l&#8217;installation de PowerShell V2.</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-windows-2008-r2.html' rel='bookmark' title='Poster Windows 2008 R2'>Poster Windows 2008 R2</a></li>
<li><a href='http://aidexchange.fr/powershell/module-powershell-pour-grer-le-dhcp.html' rel='bookmark' title='Module PowerShell pour gérer le DHCP'>Module PowerShell pour gérer le DHCP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/activer-editeur-powershell-sur-windows-2008-r2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variables d&#8217;environnement avec PowerShell</title>
		<link>http://aidexchange.fr/powershell/variables-environnement-avec-powershell.html</link>
		<comments>http://aidexchange.fr/powershell/variables-environnement-avec-powershell.html#comments</comments>
		<pubDate>Wed, 14 Dec 2011 08:39:23 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Variables d'environnement]]></category>

		<guid isPermaLink="false">http://aidexchange.fr/?p=2670</guid>
		<description><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/>Voici comment utiliser les variables d&#8217;environnement avec PowerShell. Afficher les variables d&#8217;environnement: Get-ChildItem Env: Afficher une variable d&#8217;environnement: $Env:os Utiliser les variables d&#8217;environnement: Set-Location $env:USERPROFILE No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://aidexchange.fr/wp-content/plugins/category-icons/icons/Powershell.png" width="70" height="70" alt="" title="Powershell" /><br/><p>Voici comment utiliser les variables d&#8217;environnement avec PowerShell.</p>
<p>Afficher les variables d&#8217;environnement:</p>

<div class="wp_codebox"><table><tr id="p267026"><td class="code" id="p2670code26"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-ChildItem</span> Env:</pre></td></tr></table></div>

<p>Afficher une variable d&#8217;environnement:</p>

<div class="wp_codebox"><table><tr id="p267027"><td class="code" id="p2670code27"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$Env</span>:os</pre></td></tr></table></div>

<p>Utiliser les variables d&#8217;environnement:</p>

<div class="wp_codebox"><table><tr id="p267028"><td class="code" id="p2670code28"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Set-Location</span> <span style="color: #800080;">$env</span>:USERPROFILE</pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://aidexchange.fr/powershell/variables-environnement-avec-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

