<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>PowerShell sur Technet et en français : Scripts PS V2</title><link>http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx</link><description>Tags: Scripts PS V2</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Au revoir…</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/au-revoir.aspx</link><pubDate>Tue, 10 Nov 2009 15:52:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292834</guid><dc:creator>patricg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292834.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292834</wfw:commentRss><description>&lt;p align="justify"&gt;Voilà un message que l’on pense ne jamais écrire mais tout a une fin !&lt;/p&gt;  &lt;p align="justify"&gt;Il se trouve qu’après avoir présenté PowerShell depuis 5 ans chez Microsoft et animé ce blog depuis 1 an (et d’autres), je vais quitter Microsoft dans les prochains jours. &lt;/p&gt;  &lt;p align="justify"&gt;Vous ne me retrouverez donc plus sur ce site mais pour ceux qui souhaite ne pas perdre la trace, vous pourrez me retrouver via les multiples réseaux sociaux, notamment les suivants :&lt;/p&gt;  &lt;p align="center"&gt;&amp;#160;&lt;a title="http://pat-info.blogspot.com/" href="http://pat-info.blogspot.com/"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="http://pat-info.blogspot.com/" border="0" alt="http://pat-info.blogspot.com/" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_948D/Rss_3.jpg" width="50" height="50" /&gt;&lt;/a&gt; &lt;a href="http://www.facebook.com/patrick.guimonet"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="http://www.facebook.com/patrick.guimonet" border="0" alt="http://www.facebook.com/patrick.guimonet" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/facebook_marketing_3.png" width="48" height="48" /&gt;&lt;/a&gt; &lt;a href="http://www.viadeo.com/fr/profile/patrick.gui"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="http://www.viadeo.com/fr/profile/patrick.gui" border="0" alt="http://www.viadeo.com/fr/profile/patrick.gui" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/viadeo_marketing_3.png" width="48" height="49" /&gt;&lt;/a&gt; &lt;a href="http://www.linkedin.com/in/patrickguimonet"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="http://www.linkedin.com/in/patrickguimonet" border="0" alt="http://www.linkedin.com/in/patrickguimonet" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/linkedin_marketing_3.png" width="48" height="48" /&gt;&lt;/a&gt; &lt;a href="http://twitter.com/patricg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="twitter_marketing" border="0" alt="twitter_marketing" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/twitter_marketing_3.png" width="48" height="48" /&gt;&lt;/a&gt; &lt;a href="http://www.slideshare.net/Patricg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="http://www.slideshare.net/Patricg" border="0" alt="http://www.slideshare.net/Patricg" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/image_3.png" width="53" height="55" /&gt;&lt;/a&gt; &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sourire !" border="0" alt="Sourire !" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/image_6.png" width="53" height="52" /&gt;&lt;/p&gt;  &lt;p&gt;Ce n’est donc qu’un au revoir, j’en suis sûr !&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;Et comme j’aime tout particulièrement les citations, je voudrais finir avec une que j’apprécie, que j’ai utilisée plusieurs fois lors de mes présentations PowerShell et qui s’applique bien à PowerShell :&lt;/p&gt;  &lt;blockquote&gt;   &lt;h4 align="justify"&gt;&lt;strong&gt;« J’ai refait tous les calculs, ils confirment l’opinion des spécialistes : mon idée est irréalisable. Il ne me reste plus qu’une seule chose à faire : la réaliser »&lt;/strong&gt;&lt;/h4&gt;    &lt;h4&gt;&lt;strong&gt;Pierre-Georges Latécoère.&lt;/strong&gt;&lt;/h4&gt; &lt;/blockquote&gt;  &lt;p&gt;Merci pour votre fidélité.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/guimonet%5B1%5D_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="MICROSOFT FRANCE&amp;#13;Equipe Microsoft TechNet&amp;#13;Laurence Ayache" border="0" alt="MICROSOFT FRANCE&amp;#13;Equipe Microsoft TechNet&amp;#13;Laurence Ayache" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/Aurevoir_ED64/guimonet%5B1%5D_thumb.jpg" width="94" height="114" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292834" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/Actualit_E900_s/default.aspx">Actualités</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_English_2F00_Anglais/default.aspx">_English/Anglais</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/powershell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.technet.com/powershell/archive/tags/Ressources/default.aspx">Ressources</category><category domain="http://blogs.technet.com/powershell/archive/tags/Open+XML/default.aspx">Open XML</category><category domain="http://blogs.technet.com/powershell/archive/tags/Actualit_26002300_233_3B00_s/default.aspx">Actualit&amp;#233;s</category><category domain="http://blogs.technet.com/powershell/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://blogs.technet.com/powershell/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.technet.com/powershell/archive/tags/Office/default.aspx">Office</category><category domain="http://blogs.technet.com/powershell/archive/tags/SCCM/default.aspx">SCCM</category><category domain="http://blogs.technet.com/powershell/archive/tags/Windows+Server+2008+R2/default.aspx">Windows Server 2008 R2</category><category domain="http://blogs.technet.com/powershell/archive/tags/AD/default.aspx">AD</category><category domain="http://blogs.technet.com/powershell/archive/tags/bing/default.aspx">bing</category></item><item><title>Session PowerShell V2 aux MS Days : toutes les démos…</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/session-powershell-v2-aux-ms-days-toutes-les-d-mos.aspx</link><pubDate>Tue, 10 Nov 2009 15:35:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292828</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292828.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292828</wfw:commentRss><description>&lt;P&gt;Ensuite Antoine Habert nous a présenté PoshBoard 2.0&amp;nbsp; &lt;/P&gt;
&lt;P&gt;cf. &lt;A href="http://blogs.technet.com/powershell/archive/2009/09/30/poshboard-2-0-est-en-ligne.aspx" mce_href="http://blogs.technet.com/powershell/archive/2009/09/30/poshboard-2-0-est-en-ligne.aspx"&gt;PoshBoard 2.0 est en ligne !&lt;/A&gt; et &lt;/P&gt;
&lt;P&gt;&lt;A href="http://poshboard.codeplex.com/" mce_href="http://poshboard.codeplex.com/"&gt;http://poshboard.codeplex.com/&lt;/A&gt; &lt;A href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/_us_2.gif" mce_href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/_us_2.gif"&gt;&lt;IMG title=_us border=0 alt=_us src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/_us_thumb.gif" width=18 height=13 mce_src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/_us_thumb.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen2%5B1%5D_2.png" mce_href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen2%5B1%5D_2.png"&gt;&lt;IMG title=poshboard2screen2[1] border=0 alt=poshboard2screen2[1] src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen2%5B1%5D_thumb.png" width=443 height=284 mce_src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen2%5B1%5D_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Enfin vous pourrez trouver en attachement de ce mail l’ensemble des scripts de démos dans un seul fichier zip.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292828" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3292828.ashx" length="20727" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Session PowerShell V2 aux MS Days : démos partie 4</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/session-powershell-v2-aux-ms-days-d-mos-partie-4.aspx</link><pubDate>Tue, 10 Nov 2009 15:26:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292826</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292826.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292826</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_4.png" mce_href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_thumb_1.png" width=400 height=299 mce_src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Enfin cette dernière partie contient 2 démos sympathiques sur :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;comment afficher une barre de progression en PS &lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_6.png" mce_href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_thumb_2.png" width=390 height=303 mce_src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie4_E6A1/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;éteindre son ordinateur ! Fin de la démo ! :-) &lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;stop-computer -computername remote –force&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Les scripts sont attachés à ce message.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292826" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3292826.ashx" length="643" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Session PowerShell V2 aux MS Days : démos partie 3</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/session-powershell-v2-aux-ms-days-d-mos-partie-3.aspx</link><pubDate>Tue, 10 Nov 2009 15:08:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292821</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292821.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292821</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_thumb.png" width="398" height="308" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Cette troisième série de démonstrations aborde les fonctionnalités avancées de V2 en terme d’automatisation.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Notion de jobs &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_thumb_1.png" width="464" height="361" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Exécution à distance (“remoting”) &lt;/li&gt;    &lt;li&gt;Gestion des évènements (“Eventing”) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_thumb_2.png" width="445" height="346" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_thumb_3.png" width="453" height="352" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Les scripts sont attachés à ce message.&lt;/p&gt;  &lt;p&gt;Ils incluent un exemple que je n’ai pas eu le temps de jouer et qui permet d’ajouter à distance des fonctionnalités sur un server Windows Server 2008 R2 :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie3_E2DA/image_thumb_4.png" width="408" height="317" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292821" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3292821.ashx" length="2072" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Session PowerShell V2 aux MS Days : démos partie 2</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/session-powershell-v2-aux-ms-days-d-mos-partie-2.aspx</link><pubDate>Tue, 10 Nov 2009 10:55:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292751</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292751.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292751</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_thumb.png" width="398" height="310" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cette deuxième série de démonstrations aborde les fonctionnalités avancées de V2 en terme de programmation.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Notion de fonctions avancées&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_thumb_1.png" width="422" height="328" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Notion de module &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;via l’exemple de &lt;a href="http://powerboots.codeplex.com/"&gt;PowerBoots&lt;/a&gt; &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie2_A78B/image_thumb_2.png" width="314" height="244" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Les scripts sont attachés à ce message.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292751" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3292751.ashx" length="10318" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Session PowerShell V2 aux MS Days : démos partie 1</title><link>http://blogs.technet.com/powershell/archive/2009/11/10/session-powershell-v2-aux-ms-days-d-mos-partie-1.aspx</link><pubDate>Tue, 10 Nov 2009 10:42:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3292742</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3292742.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3292742</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_6.png" width="398" height="310" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Cette première série de démonstrations aborde :&lt;/p&gt;  &lt;p&gt;1°) les bases ou&amp;#160; PowerShell V1 et les 4 commandes de base : &lt;strong&gt;get-command, get-help, get-member, get-psdrive&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;On montre également que l’on manipule des objets .Net&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb.png" width="464" height="361" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2°) &lt;strong&gt;les interfaces graphiques avec PowerShell&lt;/strong&gt;. Langage de commandes ne rime pas forcément avec interface en mode caractère.&lt;/p&gt;  &lt;p&gt;On peut très facilement gérer le son :&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;$spVoice = &lt;span class="kwrd"&gt;new&lt;/span&gt;-&lt;span class="kwrd"&gt;object&lt;/span&gt; -com &lt;span class="str"&gt;&amp;quot;SAPI.SpVoice&amp;quot;&lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;$spVoice.Speak(&lt;span class="str"&gt;&amp;quot;Bienvenue aux Microsoft Days de Paris !&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p class="csharpcode"&gt;ou les graphiques WinForms en PowerShell :&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_1.png" width="466" height="362" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;La réalisation de graphiques de ce type est très simple avec la librairie &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=fr&amp;amp;FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c"&gt;Microsoft Chart Controls for Microsoft .NET Framework 3.5&lt;/a&gt; (la documentation est accessible &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=EE8F6F35-B087-4324-9DBA-6DD5E844FD9F&amp;amp;displaylang=en"&gt;ici&lt;/a&gt; et un excellent cours là : &lt;a title="http://www.dotnet-france.com/Documents/Win/35/Microsoft%20Chart%20Controls.pdf" href="http://www.dotnet-france.com/Documents/Win/35/Microsoft%20Chart%20Controls.pdf"&gt;http://www.dotnet-france.com/Documents/Win/35/Microsoft%20Chart%20Controls.pdf&lt;/a&gt; ) :&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_2.png" width="244" height="180" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;On voit ensuite les spécificités PowerShell V2 : &lt;strong&gt;out-gridview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_3.png" width="408" height="307" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;et le support de WPF :&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_4.png" width="388" height="148" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SessionPowerShellV2auxMSDaysdmospartie1_A482/image_thumb_5.png" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Les scripts sont attachés à ce message.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3292742" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3292742.ashx" length="6139" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Comparing Python and PowerShell DBA Scripting…</title><link>http://blogs.technet.com/powershell/archive/2009/09/03/comparing-python-and-powershell-dba-scripting.aspx</link><pubDate>Thu, 03 Sep 2009 10:28:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3278887</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3278887.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3278887</wfw:commentRss><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is a very good article comparing both Powershell and Python for DBA standard tasks.&lt;/p&gt;  &lt;p&gt;The examples taken are : &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Nothing earth shattering here, but I hope that you will find them useful. They are&lt;/em&gt;&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;&lt;em&gt;Listing installed hot fixes, i.e. DST patch&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;Checking free space on drives.&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;Finding a database across multiple servers&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;Checking the version of SQL Server installed&lt;/em&gt; &lt;/li&gt;   &lt;/ol&gt; &lt;/blockquote&gt;  &lt;p&gt;PowerShell appears from far as the most concise of both.&lt;/p&gt;  &lt;p&gt;Here is the conclusion :&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I'm pretty excited about what PowerShell offers. I'm beginning to think it's easier to get things done with it and it looks like you can get more done with fewer lines of code using PowerShell. I found Python a bit easier to read initially but I'm getting used to the PowerShell syntax with the help of Bruce Payette's PowerShell book and several PowerShell blogs and forum posts. Plenty of support has built up around PowerShell that helped me to write this article both from Microsoft and PowerShell users. One thing I won't forget is Gert Drapers saying during his conference presentation that prior to PowerShell he used Perl for his admin scripts. It obvious from Bruce Payette's book that Microsoft did take a significant amount of inspiration from languages like Python and Perl to build PowerShell. No matter which scripting language you choose, I think to be really effective in a large environment you must learn to script. I'm hooked on PowerShell because of what it can do to make my life simpler in our Microsoft environment but also the exposure to .Net and WMI that it provides for a DBA.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And the full article is here : &lt;a title="http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-scripting-/" href="http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-scripting-/"&gt;http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-scripting-/&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ComparingPythonandPowerShellDBAScripting_84D5/_us_2.gif"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="_us" border="0" alt="_us" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ComparingPythonandPowerShellDBAScripting_84D5/_us_thumb.gif" width="18" height="13" /&gt;&lt;/a&gt;&lt;em&gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-scripting-/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ComparingPythonandPowerShellDBAScripting_84D5/image_3.png" width="611" height="442" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3278887" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_English_2F00_Anglais/default.aspx">_English/Anglais</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>PowerShell 2 et Word 2007 : Génération de fiches serveur</title><link>http://blogs.technet.com/powershell/archive/2009/03/03/powershell-2-et-word-2007-g-n-ration-de-fiches-serveur.aspx</link><pubDate>Tue, 03 Mar 2009 14:45:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3208697</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3208697.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3208697</wfw:commentRss><description>&lt;p&gt;Si vous voulez savoir comment générer de beaux rapports sur vos serveurs au format Word 2007 en PowerShell, voici une très bonne source d’inspiration et d’information. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://scriptingof.blogspot.com/2009/02/powershell-2-et-word-2007-generation-de.html"&gt;&lt;strong&gt;PowerShell 2 et Word 2007 : Génération de fiches serveur&lt;/strong&gt;&lt;/a&gt; sur &lt;a title="http://scriptingof.blogspot.com/" href="http://scriptingof.blogspot.com/"&gt;http://scriptingof.blogspot.com/&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Nous y voilà, nous pouvons générer une fiche serveur en 4 étapes :&lt;/em&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://scriptingof.blogspot.com/2009/01/creation-de-fiche-serveur-avec-word.html"&gt;&lt;em&gt;Partie 1&lt;/em&gt;&lt;/a&gt;&lt;em&gt; : Installation et configuration des pré-requis.&lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://scriptingof.blogspot.com/2009/02/creation-de-fiche-serveur-avec-word.html"&gt;&lt;em&gt;Partie 2&lt;/em&gt;&lt;/a&gt;&lt;em&gt; : Création du module PowerShell collectant les informations sur une machine distante.&lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://scriptingof.blogspot.com/2009/02/creation-de-fiche-serveur-avec-word_13.html"&gt;&lt;em&gt;Partie 3&lt;/em&gt;&lt;/a&gt;&lt;em&gt; : Création du document Word 2007 (template).&lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://scriptingof.blogspot.com/2009/02/creation-de-fiche-serveur-avec-word_20.html"&gt;&lt;em&gt;Partie 4&lt;/em&gt;&lt;/a&gt;&lt;em&gt; : Génération de la fiche serveur.&lt;/em&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://scriptingof.blogspot.com/2009/02/powershell-2-et-word-2007-generation-de.html"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="296" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/PowerShell2etWord2007Gnrationdefichesser_B37F/image_3.png" width="531" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3208697" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/Ressources/default.aspx">Ressources</category><category domain="http://blogs.technet.com/powershell/archive/tags/Open+XML/default.aspx">Open XML</category></item><item><title>Sortie de PoshBoard v0.4 !</title><link>http://blogs.technet.com/powershell/archive/2009/03/03/sortie-de-poshboard-v0-4.aspx</link><pubDate>Tue, 03 Mar 2009 11:32:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3208607</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3208607.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3208607</wfw:commentRss><description>&lt;p align="justify"&gt;Si vous avez lu mes messages sur le sujet (notamment : &lt;a href="http://blogs.technet.com/patricg/archive/2009/02/13/les-techdays-2009-fin.aspx"&gt;Les TechDays 2009, fin …&lt;/a&gt; et &lt;a href="http://blogs.technet.com/powershell/archive/2008/12/19/un-portail-d-administration-en-ajax-silverlight-et-powershell.aspx"&gt;un portail d'administration en Ajax, Silverlight et Powershell ?&lt;/a&gt;) ou étiez présents aux TechDays lors de la session OPT304, vous apprécierez de pouvoir “jouer” avec la toute dernière version 0.x de Poshboard. Elle est disponible sur &lt;a href="http://www.codeplex.com/Poshboard"&gt;Codeplex&lt;/a&gt; comme indiqué par Antoine sur son Blog :&lt;/p&gt;  &lt;p align="center"&gt;&amp;#160;&lt;a href="http://devinfra.blogspot.com/2009/03/poshboard-04-disponible.html"&gt;&lt;strong&gt;PoshBoard 0.4 disponible !&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Voici quelques détails : &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Dans cette version, vous allez pouvoir tester les nouveaux widgets &lt;/em&gt;&lt;a href="http://blogs.technet.com/mstechdays/archive/2009/02/13/les-techdays-2009-fin.aspx"&gt;&lt;em&gt;présentés aux Techdays&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, basés sur &lt;/em&gt;&lt;a href="http://blacklight.codeplex.com/"&gt;&lt;em&gt;Blacklight&lt;/em&gt;&lt;/a&gt;&lt;em&gt; et l'excellent &lt;/em&gt;&lt;a href="http://www.codeplex.com/wpfbookcontrol"&gt;&lt;em&gt;Silverlight book control&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Le Refresher est à nouveau de la partie, ainsi qu'une nouvelle possibilité de rafraichir (ou pas) les scripts de la page via un simple clic de bouton.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;img height="207" src="http://img13.imageshack.us/img13/6716/poshboard2.jpg" width="396" /&gt; &lt;/p&gt;    &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_Nb_tnJCL_Vw/SayHkpkJxKI/AAAAAAAAAMo/RwdcaCEdFU8/s1600-h/poshboard5.jpg"&gt;&lt;em&gt;&lt;img alt="" src="http://2.bp.blogspot.com/_Nb_tnJCL_Vw/SayHkpkJxKI/AAAAAAAAAMo/RwdcaCEdFU8/s400/poshboard5.jpg" border="0" /&gt;&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;img height="212" alt="poshboard.jpg" src="http://img13.imageshack.us/img13/5424/poshboard.jpg" width="392" /&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Vous aurez aussi l'occasion de tester le service web WCF PowerShell dans les widgets flipbook et wcfPowershelloutput&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href=" http://www.devinfra.blogspot.com"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="204" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/SortiedePoshBoardv0.4_8623/image_3.png" width="498" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3208607" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/Actualit_E900_s/default.aspx">Actualités</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_English_2F00_Anglais/default.aspx">_English/Anglais</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Comment … tout pêter avec PowerShell ?</title><link>http://blogs.technet.com/powershell/archive/2009/01/29/comment-tout-p-ter-avec-powershell.aspx</link><pubDate>Thu, 29 Jan 2009 16:19:04 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3194332</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3194332.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3194332</wfw:commentRss><description>&lt;p&gt;Vous comprendrez mieux en regardant ceci : &lt;a href="https://blogs.technet.com/windows7/archive/2009/01/27/windows-server-2008-r2-active-directory-recycle-bin.aspx"&gt;Windows Server 2008 R2 - Active Directory Recycle Bin &lt;/a&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/fr_4.jpg"&gt;&lt;img title="fr" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="15" alt="fr" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/fr_thumb_1.jpg" width="22" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogcastrepository.com/blogs/benoits/archive/2009/01/19/active-directory-recycle-bin.aspx"&gt;&lt;img alt="*****, j&amp;#39;ai tout pété l&amp;#39;AD !!!!!" src="http://www.entrevue.fr/media/mistersylvestre-3356-2.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;et en allant à la source : &lt;a href="http://blogcastrepository.com/blogs/benoits/archive/2009/01/19/active-directory-recycle-bin.aspx"&gt;Active Directory Recycle Bin&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/fr_4.jpg"&gt;&lt;img title="fr" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="15" alt="fr" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/fr_thumb_1.jpg" width="22" border="0" /&gt;&lt;/a&gt; &lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/Smiley_2.jpg"&gt;&lt;img title="Smiley" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="45" alt="Smiley" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/CommenttoutpteravecPowerShell_C8F2/Smiley_thumb.jpg" width="43" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3194332" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V2/default.aspx">PowerShell V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>PowerShell et SharePoint : créer des groupes et des utilisateurs dans un site SharePoint</title><link>http://blogs.technet.com/powershell/archive/2008/12/18/powershell-et-sharepoint-cr-er-des-groupes-et-des-utilisateurs-dans-un-site-sharepoint.aspx</link><pubDate>Thu, 18 Dec 2008 15:45:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3170778</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3170778.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3170778</wfw:commentRss><description>&lt;p&gt;Voici un bel exemple de ce que l'on peut faire avec PowerShell  &lt;p&gt;&lt;b&gt;Merci à Nicolas Schmitt qui m'a transmis cet exemple.&lt;/b&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;Introduction :&lt;/b&gt;  &lt;p&gt;Comme parler à SharePoint via Powershell :  &lt;ul&gt; &lt;li&gt;Charger la DLL SharePoint :  &lt;ul&gt; &lt;li&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;[Void][System.Reflection.Assembly]::LoadWithPartial&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;Name("Microsoft.SharePoint")&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Utiliser les API .Net de SharePoint comme si vous étiez en C# (ou VB ou tout autre langage .Net). Par exemple, ouvrir un objet SPSite :  &lt;ul&gt; &lt;li&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;$site = New-Object Microsoft.SharePoint.SPSite($siteurl)&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;A la fin du script, ne pas oublier de libérer les objets SharePoint, par exemple :  &lt;ul&gt; &lt;li&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;$site.Dispose();&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;b&gt;Exemple de script&lt;/b&gt;  &lt;p&gt;Pour illustrer ce que l’on peut faire avec PowerShell et SharePoint, voici un script qui permet de créer des groupes et des utilisateurs dans un site SharePoint. La liste des groupes et des utilisateurs est passée en paramètre dans 2 fichiers CSV.  &lt;p&gt;Ceci est assez pratique, en particulier lors des tests d’intégration, lorsque l’on supprime et recrée souvent des collections de sites.  &lt;p&gt;Ce script prend en paramètre :  &lt;ul&gt; &lt;li&gt;L’url du site où l’on va importer les groupes et utilisateurs  &lt;li&gt;Un fichier CSV contenant les groupes&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;o 3 colonnes : nom du groupe, permission, propriétaire du groupe (si vide, on prend l’utilisateur courant)&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;Un fichier CSV contenant les utilisateurs à importer&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;o 2 colonnes : login de l’utilisateur, groupe dans lequel positionner l’utilisateur (facultatif)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Exemple d'utilisation :  &lt;p&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;powershell ./ImportGroupsAndUsers.ps1 &lt;/font&gt;&lt;a href="http://team/" mce_href="http://team"&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;http://team&lt;/font&gt;&lt;/a&gt;&lt;font face="Lucida Console" color="#0000ff"&gt; –userfile Users.csv&lt;/font&gt;  &lt;p&gt;&lt;b&gt;Principales fonctions utilisées :&lt;/b&gt;  &lt;blockquote&gt; &lt;p&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;ipcsv $groupfile | foreach { Write-Host $_.GroupName }&lt;/font&gt; : Importe un fichier CSV, et affiche la colonne « GroupName » de chaque ligne  &lt;p&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;$spuser = $web.EnsureUser($user)&lt;/font&gt; : crée un utilisateur dans le site&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="Lucida Console" color="#0000ff"&gt;$web.SiteGroups.Add($group, $owner, $null, "")&lt;/font&gt; : Crée un groupe dans le site  &lt;p&gt;Le script complet est en attachement, ça donne cela :  &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;param&lt;/span&gt; (&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    [string] $siteurl = &lt;span class="str"&gt;""&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    [string] $userfile = &lt;span class="str"&gt;""&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    [string] $groupfile = &lt;span class="str"&gt;""&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;) &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; ($siteurl &lt;span class="preproc"&gt;-eq&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    $siteurl = Read-Host &lt;span class="str"&gt;"Site url"&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;} &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;[Void][System.Reflection.Assembly]::LoadWithPartialName(&lt;span class="str"&gt;"Microsoft.SharePoint"&lt;/span&gt;); &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;Write-Host -ForegroundColor green &lt;span class="str"&gt;"Opening SharePoint site..."&lt;/span&gt;; &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;$site = New-Object Microsoft.SharePoint.SPSite($siteurl)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;$web = $site.RootWeb; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; ($groupfile &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;) &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;    Write-Host -ForegroundColor green &lt;span class="str"&gt;"Importing groups from $groupfile"&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;    ipcsv $groupfile | &lt;span class="kwrd"&gt;foreach&lt;/span&gt; { &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;        $group = $_.GroupName;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        $perm = $_.Permissions;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        $owner = $_.Owner;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; ($owner &lt;span class="preproc"&gt;-eq&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;) { $owner = $web.CurrentUser.LoginName }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;        Write-Host -ForegroundColor green &lt;span class="str"&gt;"  $group (owner = $owner, perm = $perm)"&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        $exists = $web.SiteGroups | where { $_.Name &lt;span class="preproc"&gt;-eq&lt;/span&gt; $group }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; ($exists &lt;span class="preproc"&gt;-eq&lt;/span&gt; $null)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;            &lt;span class="rem"&gt;# Create group&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;            $web.SiteGroups.Add($group, $web.EnsureUser($owner), $null, &lt;span class="str"&gt;""&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;            &lt;span class="rem"&gt;# Give permissions to the group&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;            $assign = New-Object Microsoft.SharePoint.SPRoleAssignment($web.SiteGroups[$group]);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;            $assign.RoleDefinitionBindings.Add($web.RoleDefinitions[$perm])&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            $web.RoleAssignments.Add($assign)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;        } &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;        &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;            Write-Host -ForegroundColor magenta &lt;span class="str"&gt;"    already exist"&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;} &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; ($userfile &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;    Write-Host -ForegroundColor green &lt;span class="str"&gt;"Importing users from $userfile"&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;    ipcsv $userfile | &lt;span class="kwrd"&gt;foreach&lt;/span&gt; { &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;        $user = $_.User&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt;        $group = $_.Group&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;        Write-Host -ForegroundColor green &lt;span class="str"&gt;"  $user -&amp;gt; $group"&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt;        &lt;span class="rem"&gt;# Add user to the web&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;        $spuser = $web.EnsureUser($user);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;        &lt;span class="rem"&gt;# Add user to group&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; ($group &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;) &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  56:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  57:  &lt;/span&gt;            $web.SiteGroups[$group].AddUser($spuser);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  58:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  59:  &lt;/span&gt;    }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  60:  &lt;/span&gt;} &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  61:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  62:  &lt;/span&gt;$site.Dispose();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  63:  &lt;/span&gt;Write-Host -ForegroundColor green &lt;span class="str"&gt;"Done."&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&lt;font face="Lucida Console" color="#0000ff"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3170778" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3170778.ashx" length="1107" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_E700_ais_2F00_French/default.aspx">_ Français/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/PowerShell+V1/default.aspx">PowerShell V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category><category domain="http://blogs.technet.com/powershell/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Script : Audit d'un serveur (ou d'un client)</title><link>http://blogs.technet.com/powershell/archive/2008/12/15/script-audit-d-un-serveur-ou-d-un-client.aspx</link><pubDate>Mon, 15 Dec 2008 12:32:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3168936</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3168936.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3168936</wfw:commentRss><description>&lt;P&gt;Le résultat est très sympathique :&lt;/P&gt;
&lt;P&gt;&lt;IMG height=268 src="http://1.bp.blogspot.com/_cb6LrZBYWIw/SPZHEOagHmI/AAAAAAAAALA/wAyjFa1u-cw/s1600/Audit.jpg" width=422 mce_src="http://1.bp.blogspot.com/_cb6LrZBYWIw/SPZHEOagHmI/AAAAAAAAALA/wAyjFa1u-cw/s1600/Audit.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Ça s'appuie bien sûr sur WMI, c'est facilement modifiable pour remonter d'autres informations si vous le souhaitez et c'est téléchargeable ici :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://teckinfo.blogspot.com/2008/10/powershell-audit-script_15.html" mce_href="http://teckinfo.blogspot.com/2008/10/powershell-audit-script_15.html"&gt;Powershell Audit Script&lt;/A&gt;&amp;nbsp;&lt;IMG src="http://www.microsoft.com/france/images/us.gif" mce_src="http://www.microsoft.com/france/images/us.gif"&gt;sur le très bon site de &lt;A href="http://teckinfo.blogspot.com/" mce_href="http://teckinfo.blogspot.com"&gt;Virtu-Al&lt;/A&gt;&amp;nbsp; &lt;IMG src="http://www.microsoft.com/france/images/us.gif" mce_src="http://www.microsoft.com/france/images/us.gif"&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://teckinfo.blogspot.com/2008/10/powershell-audit-script_15.html" mce_href="http://teckinfo.blogspot.com/2008/10/powershell-audit-script_15.html"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=194 alt=image src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ScriptAuditdunserveuroudunclient_9452/image_3.png" width=425 border=0 mce_src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ScriptAuditdunserveuroudunclient_9452/image_3.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A noter quand même que pour le faire fonctionner (sinon j'avais des erreurs) j'ai dû rajouter dans les parties :&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Event Log Errors&lt;/LI&gt;
&lt;LI&gt;Event Log Warnings&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;2 petits if pour traiter le cas où il n'y a pas d'erreurs , ni d'avertissements.&lt;/P&gt;
&lt;P&gt;Le script modifié est en attachement de ce message.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3168936" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/powershell/attachment/3168936.ashx" length="70452" type="text/plain" /><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_English_2F00_Anglais/default.aspx">_English/Anglais</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category><category domain="http://blogs.technet.com/powershell/archive/tags/_5F00_+Fran_26002300_231_3B00_ais_2F00_French/default.aspx">_ Fran&amp;#231;ais/French</category></item><item><title>Script : Get-DiskUsage</title><link>http://blogs.technet.com/powershell/archive/2008/12/04/script-get-diskusage.aspx</link><pubDate>Thu, 04 Dec 2008 14:31:47 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3163814</guid><dc:creator>patricg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/powershell/comments/3163814.aspx</comments><wfw:commentRss>http://blogs.technet.com/powershell/commentrss.aspx?PostID=3163814</wfw:commentRss><description>&lt;p&gt;Un grand retour pour les aficionados d'Unix ! Ca vient d'ici : &lt;a title="http://jtruher.spaces.live.com/Blog/cns!7143DA6E51A2628D!138.entry?wa=wsignin1.0&amp;amp;sa=390461615" href="http://jtruher.spaces.live.com/Blog/cns!7143DA6E51A2628D!138.entry?wa=wsignin1.0&amp;amp;sa=390461615"&gt;http://jtruher.spaces.live.com/Blog/cns!7143DA6E51A2628D!138.entry?wa=wsignin1.0&amp;amp;sa=390461615&lt;/a&gt;&amp;nbsp;&lt;img src="http://www.microsoft.com/france/images/us.gif"&gt;&lt;/p&gt; &lt;p&gt;et ça donne cela :&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ScriptGetDiskusage_AFEB/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="400" alt="image" src="http://blogs.technet.com/blogfiles/powershell/WindowsLiveWriter/ScriptGetDiskusage_AFEB/image_thumb.png" width="499" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;font face="Lucida Console" color="#00ff00"&gt;&lt;font color="#000000"&gt;# Get-DiskUsage.ps1 (aliased to dfspace)&lt;br&gt;# Use Get-WMIObject to collect disk free info&lt;br&gt;# Can be used with remote systems&lt;br&gt;#&lt;br&gt;param ( [string]$computer = "." , [switch]$all)&lt;br&gt;# Formatting &lt;br&gt;$size = @{ l = "Size (MB)"; e = { $_.size/1mb};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f = "{0:N}"}&lt;br&gt;$free = @{ l = "free (MB)"; e = { $_.freespace/1mb}; f = "{0:N}"} &lt;br&gt;$perc = @{ l = "percent"; e = { 100.0 * ([double]$_.freespace/[double]$_.size)}; f="{0:f}" }&lt;br&gt;$name = @{ e = "name"; f = "{0,-20}" }&lt;br&gt;$fields = $name,$size,$free,$perc&lt;br&gt;# in case the user wants to see more than just local drives&lt;br&gt;$filter = "DriveType = '3'"&lt;br&gt;if ( $all ) { $filter = "" }&lt;br&gt;# go do the work by getting the information from the appropriate&lt;br&gt;# computer, and send it to format-table with the appropriate &lt;br&gt;# fields and formatting info&lt;br&gt;get-wmiobject -class win32_logicaldisk -filter $filter -comp $computer | &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format-table $fields -auto&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3163814" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V1/default.aspx">Scripts PS V1</category><category domain="http://blogs.technet.com/powershell/archive/tags/Scripts+PS+V2/default.aspx">Scripts PS V2</category></item></channel></rss>