Test
$thumbprint = "< THUMBPRINT_OHNE_LEERZEICHEN >"
# Zertifikat aus dem lokalen Maschinenstore holen
$cert = Get-ChildItem Cert:\LocalMachine\My\$thumbprint
if (-not $cert) { throw "Zertifikat mit dem Thumbprint wurde nicht gefunden." }
# WMI/CIM Instanz für RDP-Tcp holen
$ts = Get-CimInstance -Namespace root/cimv2/TerminalServices `
-ClassName Win32_TSGeneralSetting `
-Filter "TerminalName='RDP-Tcp'"
# Zertifikat-Hash setzen
Set-CimInstance -InputObject $ts -Property @{ SSLCertificateSHA1Hash = $thumbprint }
# RDP-Dienst neu starten
Restart-Service TermService -ForceCSS
/* === Grundlegendes Reset & Body === */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
}
/* === Links === */
a {
color: #007acc;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* === Header === */
header {
background-color: #007acc;
color: #fff;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
font-size: 1.8rem;
}
/* === Navigation === */
nav ul {
list-style: none;
display: flex;
gap: 1.5rem;
}
nav li {
font-weight: bold;
}
/* === Hauptinhalt === */
main {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1rem;
}
section {
background-color: #fff;
padding: 2rem;
margin-bottom: 2rem;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* === Buttons === */
button {
background-color: #007acc;
color: #fff;
border: none;
padding: 0.6rem 1.2rem;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s;
}
button:hover {
background-color: #005fa3;
}
/* === Footer === */
footer {
text-align: center;
padding: 1.5rem;
background-color: #333;
color: #fff;
}
/* === Responsive Design === */
@media (max-width: 768px) {
header {
flex-direction: column;
text-align: center;
}
nav ul {
flex-direction: column;
gap: 1rem;
margin-top: 0.5rem;
}
}