<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   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/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Hope This Helps - WMI / Powershell</title>
    <link>http://hope-this-helps.de/serendipity/</link>
    <description>IT Tipps</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.6.2 - http://www.s9y.org/</generator>
    
    

<item>
    <title>Windows 2008 / 7 - Powershell alle Rechner mit Betreibssystem in eine Datei</title>
    <link>http://hope-this-helps.de/serendipity/archives/328-Windows-2008-7-Powershell-alle-Rechner-mit-Betreibssystem-in-eine-Datei.html</link>
            <category>Clients</category>
            <category>Scripts + Code Schnipsel</category>
            <category>Server</category>
            <category>Windows</category>
            <category>WMI / Powershell</category>
    
    <comments>http://hope-this-helps.de/serendipity/archives/328-Windows-2008-7-Powershell-alle-Rechner-mit-Betreibssystem-in-eine-Datei.html#comments</comments>
    <wfw:comment>http://hope-this-helps.de/serendipity/wfwcomment.php?cid=328</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hope-this-helps.de/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=328</wfw:commentRss>
    

    <author>nospam@example.com (Christopher Pope)</author>
    <content:encoded>
    &lt;strong&gt;Problem :&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Man möchte eine Übersicht über alle im AD vorhandenen Rechner mit Betriebsystem und Servicepack&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Lösung :&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Dieses Skript exportiert alle Rechner mit OS und SP in eine Textdatei die einfach in Excel importiert werden kann.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;$ldapSearcher = new-object directoryservices.directorysearcher;&lt;br /&gt;
$ldapSearcher.filter = &quot;(objectclass=computer)&quot;;&lt;br /&gt;
$computers = $ldapSearcher.findall();&lt;br /&gt;
$pcs = &quot;Name,Os,SP&quot;;&lt;br /&gt;
foreach ($c in $computers) {&lt;br /&gt;
  $pc.Name=$c.properties[&quot;cn&quot;];&lt;br /&gt;
  $pc.OS=$c.properties[&quot;operatingsystem&quot;];&lt;br /&gt;
  $pc.SP=$c.properties[&quot;operatingsystemservicepack&quot;];&lt;br /&gt;
  $pcs = $pcs + &quot;`r`n&quot; + $pc.Name + &quot;,&quot; + $pc.OS + &quot;,&quot; + $pc.SP;&lt;br /&gt;
}&lt;br /&gt;
echo $pcs | Out-File C:\TEMP\Rechner.txt -encoding ASCII&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Der Pfad kann einfach abgeändert werden &lt;strong&gt;C:\TEMP\Rechner.txt&lt;/strong&gt; durch den Wunschpfad ersetzen.&lt;br /&gt;
&lt;br /&gt;
Es gibt natürlich auch andere Möglichkeiten : &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.faq-o-matic.net/2006/06/11/wie-kann-ich-abfragen-welche-rechner-welches-service-pack-haben/&quot;&gt;Nils Kaczenski hat einige andere Varianten auf faq-o-matic.net vorgestellt&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://itblog.eckenfels.net/archives/476-Rechner-im-AD-LDAP-mit-Powershell-auflisten.html&quot;&gt;Meine Variante ist eine leicht abgewandelte Form des von Bernd Eckenfels erstellten Skripts&lt;/a&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 08 Feb 2012 07:52:32 +0100</pubDate>
    <guid isPermaLink="false">http://hope-this-helps.de/serendipity/archives/328-guid.html</guid>
    
</item>
<item>
    <title>Windows-Firewall: WMI für Firewall </title>
    <link>http://hope-this-helps.de/serendipity/archives/317-Windows-Firewall-WMI-fuer-Firewall.html</link>
            <category>Clients</category>
            <category>Server</category>
            <category>TCP/IP</category>
            <category>VBS / WSH</category>
            <category>Windows</category>
            <category>WMI / Powershell</category>
    
    <comments>http://hope-this-helps.de/serendipity/archives/317-Windows-Firewall-WMI-fuer-Firewall.html#comments</comments>
    <wfw:comment>http://hope-this-helps.de/serendipity/wfwcomment.php?cid=317</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hope-this-helps.de/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=317</wfw:commentRss>
    

    <author>nospam@example.com (Ralf Entner)</author>
    <content:encoded>
    &lt;strong&gt;Problem&lt;/strong&gt;&lt;br /&gt;
Man möchte mittels WMI auf einen PC zugreifen wir jedoch von der Firewall blockiert.&lt;br /&gt;
Die Firewall-Konfiguration stellt den WMI-Dienst nicht zur Verfügung um diesen freizugeben.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Lösung&lt;/strong&gt;&lt;br /&gt;
Die einfachste Möglichkeit die Freigabe zu aktivieren stellt der netsh-Befehl zur Verfügung.&lt;br /&gt;
Einfach in der Shell des Remote-Computers folgenden Befehl ausführen:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;netsh firewall set service RemoteAdmin enable&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Quelle: &lt;/strong&gt;&lt;a href=&quot;http://www.poweradmin.com/help/enableWMI.aspx&quot;&gt;poweradmin.com: Enable WMI (Windows Management Instrumentation)&lt;/a&gt; 
    </content:encoded>

    <pubDate>Mon, 12 Dec 2011 09:40:21 +0100</pubDate>
    <guid isPermaLink="false">http://hope-this-helps.de/serendipity/archives/317-guid.html</guid>
    
</item>
<item>
    <title>WSH/WMI: USB-Stick (Removable Devices) ermiteln</title>
    <link>http://hope-this-helps.de/serendipity/archives/307-WSHWMI-USB-Stick-Removable-Devices-ermiteln.html</link>
            <category>WMI / Powershell</category>
    
    <comments>http://hope-this-helps.de/serendipity/archives/307-WSHWMI-USB-Stick-Removable-Devices-ermiteln.html#comments</comments>
    <wfw:comment>http://hope-this-helps.de/serendipity/wfwcomment.php?cid=307</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hope-this-helps.de/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=307</wfw:commentRss>
    

    <author>nospam@example.com (Ralf Entner)</author>
    <content:encoded>
    &lt;strong&gt;Problem:&lt;/strong&gt;&lt;br /&gt;
Um z.B. ein Backup-Lösung auf einen USB-Wechseldatenträger (Stick) zu ermöglichen, möchte man prüfen, ob ein &quot;Removable Device&quot; angeschlossen ist.&lt;br /&gt;
außerdem soll geprüft werden, ob es mehr als ein USB-Device gibt.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Lösung:&lt;/strong&gt;&lt;br /&gt;
Das nachfolgende Skript überprüft per WMI, ob &quot;Removable Devices&quot; angeschlossen sind. Sollten welche gefunden sein, wird die Anzahl, der Volumename und der Laufwerksbuchste davon ermittelt.&lt;br /&gt;
&lt;blockquote&gt;Option Explicit&lt;br /&gt;
&lt;br /&gt;
Dim WshShell&lt;br /&gt;
Dim strComputer, objWMIService, colItems, objItem&lt;br /&gt;
Dim USB, USize, UName, UAnzahl, Antwort&lt;br /&gt;
Dim BackupDir, UDesktop, UDateien, UFavoriten&lt;br /&gt;
&lt;br /&gt;
set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)&lt;br /&gt;
&lt;br /&gt;
&#039;Setzt USB-Variablen zurück&lt;br /&gt;
USB =&quot;&quot;&lt;br /&gt;
UAnzahl = 0&lt;br /&gt;
USize = 0&lt;br /&gt;
UName = &quot;&quot;&lt;br /&gt;
&lt;br /&gt;
&#039;Ermittlung von Anzahl und Eigenschaften Wechseldatenträger&lt;br /&gt;
strComputer = &quot;.&quot;&lt;br /&gt;
Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp;amp; strComputer &amp;amp; &quot;\root\cimv2&quot;)&lt;br /&gt;
Set colItems = objWMIService.ExecQuery(&quot;Select * from Win32_LogicalDisk&quot;)&lt;br /&gt;
&lt;br /&gt;
For Each objItem in colItems&lt;br /&gt;
&lt;br /&gt;
If objItem.DriveType = 2 Then &lt;br /&gt;
USB = objItem.Name &amp;amp; &quot;\&quot;&lt;br /&gt;
UName = objItem.VolumeName &lt;br /&gt;
USize = Int(objItem.FreeSpace /1048576)&lt;br /&gt;
UAnzahl = UAnzahl + 1 &#039;Anzahl WEchselmedien ermitteln&lt;br /&gt;
End if&lt;br /&gt;
&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
&#039;Überprüft, ob mehr als ein USB-Stick angesteckt ist&lt;br /&gt;
If UAnzahl &gt; 1 Then&lt;br /&gt;
MsgBox &quot;Mehrere USB-Sticks gefunden!&quot; &amp;amp; vbCRLF &amp;amp; &quot;Bitte nur Sicherungs-Stick einstecken und Sicherung neu starten.&quot;, vbOKOnly + vbCritical, &quot;Mehrere USB-Sticks gefunden&quot;&lt;br /&gt;
WScript.Quit&lt;br /&gt;
End if&lt;br /&gt;
&lt;br /&gt;
&#039;Überprüfen ob ein USB-Stick angesteckt ist&lt;br /&gt;
If USB = &quot;&quot; Then &lt;br /&gt;
MsgBox &quot;KEIN USB-Stick gefunden!&quot; &amp;amp; vbCrLf &amp;amp; &quot;Bitte überprüfen und Sicherung neu starten!&quot;, vbOKOnly + vbCritical, &quot;USB-Fehler&quot;&lt;br /&gt;
WScript.Quit&lt;br /&gt;
End If&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Mon, 26 Sep 2011 15:57:28 +0200</pubDate>
    <guid isPermaLink="false">http://hope-this-helps.de/serendipity/archives/307-guid.html</guid>
    
</item>
<item>
    <title>Windows XP - WMI Abfrage auf Win32_Product ( Error 80041001 ) funktioniert nicht</title>
    <link>http://hope-this-helps.de/serendipity/archives/301-Windows-XP-WMI-Abfrage-auf-Win32_Product-Error-80041001-funktioniert-nicht.html</link>
            <category>Scripts + Code Schnipsel</category>
            <category>VBS / WSH</category>
            <category>WMI / Powershell</category>
    
    <comments>http://hope-this-helps.de/serendipity/archives/301-Windows-XP-WMI-Abfrage-auf-Win32_Product-Error-80041001-funktioniert-nicht.html#comments</comments>
    <wfw:comment>http://hope-this-helps.de/serendipity/wfwcomment.php?cid=301</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hope-this-helps.de/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=301</wfw:commentRss>
    

    <author>nospam@example.com (Christopher Pope)</author>
    <content:encoded>
    &lt;strong&gt;Problem :&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Sie möchten über WMI die installierte Software ermitteln , die hierzu gehörige Klasse Win32_Product läuft allerdings in den Fehler ( 80041001 ) , die Lösung hierzu ist ein Patch von Microsoft den man allerdings direkt anfordern muss. Das Problem selbst ist bei Windows XP und Windows Server 2003 bekannt.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Lösung :&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Installieren des von Microsoft bereitgestellten Patches für das jeweilige System.&lt;br /&gt;
&lt;br /&gt;
Download des Patches für Windows Server 2003 : &lt;a href=&quot;http://support.microsoft.com/kb/972189&quot; title=&quot;WMI Win32_Product Hotfix für Windows Server 2003&quot;&gt;http://support.microsoft.com/kb/972189&lt;/a&gt;&lt;br /&gt;
Download des Patches für Windows XP : &lt;a href=&quot;http://support.microsoft.com/kb/970553&quot; title=&quot;WMI Win32_Product Hotfix für Windows XP&quot;&gt;http://support.microsoft.com/kb/970553&lt;/a&gt;             &lt;br /&gt;
&lt;a href=&quot;http://hope-this-helps.de/serendipity/index.php?serendipity[subpage]=Downloads&amp;thiscat=14&amp;file=56&quot; title=&quot;direkter Download&quot;&gt;WMI Win32_Product Hotfix für Windows XP&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 24 Aug 2011 08:53:05 +0200</pubDate>
    <guid isPermaLink="false">http://hope-this-helps.de/serendipity/archives/301-guid.html</guid>
    
</item>

</channel>
</rss>