<?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>WMI &#8211; Haikos Blog</title>
	<atom:link href="https://www.hertes.net/tag/wmi/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.hertes.net</link>
	<description>Blog von Haiko Hertes zu allen Themen rund um Microsoft, Cloud und Datacenter</description>
	<lastBuildDate>Thu, 23 Mar 2017 14:49:09 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>PowerShell &#8211; RAM-Konfiguration eines Systems auslesen</title>
		<link>https://www.hertes.net/2017/03/powershell-ram-konfiguration-eines-systems-auslesen/</link>
					<comments>https://www.hertes.net/2017/03/powershell-ram-konfiguration-eines-systems-auslesen/#respond</comments>
		
		<dc:creator><![CDATA[Haiko]]></dc:creator>
		<pubDate>Wed, 22 Mar 2017 20:43:00 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows Client]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Arbeitsspeicher]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WMI]]></category>
		<guid isPermaLink="false">https://www.hertes.net/?p=3414</guid>

					<description><![CDATA[Bei der Frage, ob ein Server (oder auch Client) noch etwas mehr RAM vertragen kann, stellt sich oft die Frage, wieviel RAM dann aktuell in wie vielen Modulen verbaut ist und wieviele Slots noch frei sind. Natürlich gibt es dazu auch bereits grafische Werkzeuge, die das können, aber spätestens, wenn mehrere Maschinen (ggf. auch Core-Server ohne GUI) abgefragt werden sollen, kann die PowerShell ihre Stärken ausspielen. Daher habe ich ein kleines Skript gebaut, welches diese Aufgabe erfüllt: [Cmdletbinding()] Param( [string]$Computername = "localhost" ) cls $PysicalMemory = Get-WmiObject -class "win32_physicalmemory" -namespace "root\CIMV2" -ComputerName $Computername Write-Host "Memory Modules:" -ForegroundColor Green $PysicalMemory &#124;&#8230;]]></description>
										<content:encoded><![CDATA[<p>Bei der Frage, ob ein Server (oder auch Client) noch etwas mehr RAM vertragen kann, stellt sich oft die Frage, wieviel RAM dann aktuell in wie vielen Modulen verbaut ist und wieviele Slots noch frei sind. Natürlich gibt es dazu auch bereits grafische Werkzeuge, die das können, aber spätestens, wenn mehrere Maschinen (ggf. auch Core-Server ohne GUI) abgefragt werden sollen, kann die PowerShell ihre Stärken ausspielen. Daher habe ich ein kleines Skript gebaut, welches diese Aufgabe erfüllt:</p>
<pre lang="PowerShell" line="1">[Cmdletbinding()]
Param(
    [string]$Computername = "localhost"
)
cls
$PysicalMemory = Get-WmiObject -class "win32_physicalmemory" -namespace "root\CIMV2" -ComputerName $Computername

Write-Host "Memory Modules:" -ForegroundColor Green
$PysicalMemory | Format-Table Tag,BankLabel,@{n="Capacity(GB)";e={$_.Capacity/1GB}},Manufacturer,PartNumber,Speed -AutoSize

Write-Host "Total Memory:" -ForegroundColor Green
Write-Host "$((($PysicalMemory).Capacity | Measure-Object -Sum).Sum/1GB)GB"

$TotalSlots = ((Get-WmiObject -Class "win32_PhysicalMemoryArray" -namespace "root\CIMV2" -ComputerName $Computername).MemoryDevices | Measure-Object -Sum).Sum
Write-Host "`nTotal Memory Slots:" -ForegroundColor Green
Write-Host $TotalSlots

$UsedSlots = (($PysicalMemory) | Measure-Object).Count 
Write-Host "`nUsed Memory Slots:" -ForegroundColor Green
Write-Host $UsedSlots

If($UsedSlots -eq $TotalSlots)
{
    Write-Host "All memory slots are filled up, none is empty!" -ForegroundColor Yellow
}</pre>
<p>Die Ausgabe sieht dann etwa so aus:</p>
<p><a href="https://www.hertes.net/wp-content/uploads/2017/03/PS_Memory1.png"><img fetchpriority="high" decoding="async" title="PS_Memory1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="PS_Memory1" src="https://www.hertes.net/wp-content/uploads/2017/03/PS_Memory1_thumb.png" width="644" height="389" /></a></p>
<p>Auf meinem Notebook mit nur zwei RAM-Slots (beide belegt) kommt zusätzlich noch eine kleine “Warnung”:</p>
<p><a href="https://www.hertes.net/wp-content/uploads/2017/03/PS_Memory2.png"><img decoding="async" title="PS_Memory2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="PS_Memory2" src="https://www.hertes.net/wp-content/uploads/2017/03/PS_Memory2_thumb.png" width="644" height="252" /></a></p>
<p>Ihr könnt das Skript auch hier herunterladen:</p>
<p><a title="https://gallery.technet.microsoft.com/scriptcenter/Get-Memory-RAM-configuratio-35dda12e" href="https://gallery.technet.microsoft.com/scriptcenter/Get-Memory-RAM-configuratio-35dda12e">https://gallery.technet.microsoft.com/scriptcenter/Get-Memory-RAM-configuratio-35dda12e</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.hertes.net/2017/03/powershell-ram-konfiguration-eines-systems-auslesen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
