<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Bonjour<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Voici le script minimaliste que j’ai fait en Powershell pour descendre en une fois toutes mes Descriptions (à adapter suivant votre
 AD bien sûr) :<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Get-ADComputer -LDAPFilter "(name=*)" -searchbase "OU=Ordinateurs,OU=Computers,OU=XXX,DC=XXX,DC=XXX,DC=XXX" 
 -Properties *  | % {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">    $server = $_.name<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">     $desc = $_.description<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">    </span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">if
 ($desc){<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">        Write-Host "$server => $desc"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">        Set-WmiInstance -Path "\\$server\root\cimv2:Win32_OperatingSystem=@" -Arguments @{description=$desc}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">   
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Je regarderais ensuite pour un moyen de faire les mises à jour moins brutal ;c)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Encore merci pour l’aide<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Philippe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> WAPT [mailto:wapt-bounces@lists.tranquil.it]
<b>De la part de</b> LECLERCQ Johann<br>
<b>Envoyé :</b> jeudi 18 juin 2015 13:33<br>
<b>À :</b> Hubert TOUVET; wapt@lists.tranquil.it<br>
<b>Objet :</b> Re: [Wapt] Remonté du champ Description<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        Bonjour Hubert,<br>
<br>
J'ai creusé cette question d'affectation du champ description car sur certains postes cela ne passent pas chez moi.<br>
Notamment, avec la commande wapt-get -ldebug register "affectation".<br>
<br>
Elle m'a permis de voir que tu passez "WMIC os set description='affectation" comme commande
<br>
qui dit qu'elle fait l'opération.<br>
Le message d'Olivier Le Grand m'a permis de découvrir cette commande <tt><span style="font-size:13.5pt">: net config server /srvcomment:</span></tt>"affectation"<br>
<br>
Or, il semblerait que si le service serveur était arrêté sur les postes, elle rendait l'information :<br>
<br>
        C:\Windows>net config server /srvcomment:"affectation" <br>
        Le sevice Serveur n'est pas lancé. <br>
        D'accord pour le lancer ? (O/N) [O] : o <br>
        L'erreur système 1058 s'est produite. <br>
        Le service ne peut pas être démarré parce qu'il est désactivé ou qu'aucun périph érique activé ne lui est associé.<br>
<br>
Ce sont nos instructions de sécurité d'arrêter et rendre inactif ce service sur tout notre parc.<br>
Cela va me permettre de voir sur quels postes le service est toujours actif !<br>
<br>
Y aurait-il donc un lien ?<br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>        Cordialement,<o:p></o:p></pre>
<pre>LECLERCQ Johann<o:p></o:p></pre>
<pre>Responsable Informatique et AQSSI de la DRAC Pays de la Loire<o:p></o:p></pre>
<pre>Ministère de la Culture et de la Communication<o:p></o:p></pre>
<pre>-- <o:p></o:p></pre>
<pre>Koan du jour<o:p></o:p></pre>
<pre>La clarté de la lune dépend de l'ombre des pins.<o:p></o:p></pre>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Le 18/06/2015 08:20, Hubert TOUVET a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Ou bien également par la commande<br>
   WMIC os set description='affectation'<br>
<br>
ou en faisant <br>
  wapt-get register "affectation"<br>
<br>
<br>
<br>
Le 17/06/2015 07:19, Olivier Le Grand a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Bonjour,</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>Le champ description correspond à la description de l'ordinateur en Local (Dans les propriété de l’ordinateur)</tt><br>
<br>
<img width="301" height="88" id="_x0000_i1025" src="cid:image001.png@01D0A9D1.F5345150"><br>
<br>
<br>
<tt>Mais il est possible de le remplir ce champ par script</tt><br>
<tt>Ex : </tt></span><tt><span style="font-size:13.5pt">net config server /srvcomment:"%FULLNAME%"
</span></tt><tt><span style="font-size:10.0pt">Va mettre le nom complet de l'utilisateur dans la description du PC</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
</span><br>
<tt><span style="font-size:13.5pt">Ou bien par la base de registre</span></tt><span style="font-size:13.5pt;font-family:"Courier New""><br>
<tt><a href="https://technet.microsoft.com/en-us/library/cc787346%28v=ws.10%29.aspx">https://technet.microsoft.com/en-us/library/cc787346%28v=ws.10%29.aspx</a></tt><br>
</span><tt><span style="font-size:10.0pt">Cordialement,</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>Olivier LE GRAND</tt></span><o:p></o:p></p>
</blockquote>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="4" width="100%" align="center">
</div>
<p class="MsoNormal">Merci de nous aider à préserver l'environnement en n'imprimant ce courriel et les documents joints que si nécessaire.<o:p></o:p></p>
</div>
</body>
</html>