<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Systemadministration on Blog</title>
		<link>https://informatik.fam-diebrauns.de/tags/systemadministration/</link>
		<description>Recent content in Systemadministration on Blog</description>
		<generator>Hugo</generator>
		<language>de-DE</language>
		
		
		
		
			<lastBuildDate>Sun, 18 Jan 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://informatik.fam-diebrauns.de/tags/systemadministration/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>System-Uptime mit PowerShell</title>
				<link>https://informatik.fam-diebrauns.de/posts/system-uptime/</link>
				<pubDate>Sun, 18 Jan 2026 00:00:00 +0000</pubDate>
				<guid>https://informatik.fam-diebrauns.de/posts/system-uptime/</guid>
				<description>&lt;p&gt;PowerShell 7.5.4 ist eine plattformübergreifende, quelloffene Kommandozeilen-Shell und Skriptsprache von Microsoft.&lt;/p&gt;&#xA;&lt;p&gt;Eine häufige Anforderung in der Systemadministration ist die Abfrage der aktuellen System-Uptime. Diese lässt sich unter Windows zuverlässig über das Cmdlet &lt;code&gt;Get-CimInstance&lt;/code&gt; ermitteln.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://informatik.fam-diebrauns.de/images/Bild2.png&#34; alt=&#34;Überblick PowerShell Uptime&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;berechnen&#34;&gt;&#xA;  System-Uptime berechnen&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#berechnen&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Zunächst wird der letzte Systemstart aus der Klasse &lt;strong&gt;Win32_OperatingSystem&lt;/strong&gt; gelesen und mit der aktuellen Uhrzeit verglichen.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$LastBootTime = (Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$Uptime = (Get-Date) - $LastBootTime&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$Uptime&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;kompakt&#34;&gt;&#xA;  Kompakte Ausgabe&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#kompakt&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Für eine übersichtlichere Darstellung lassen sich gezielt einzelne Eigenschaften auswählen:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
