Powershell One-Liners
Manage your Computers with Powershell One-Liners
Mit diesen Powershell-Befehlen verwalten wir unsere Computer/Policy über den Eingriff in die Registry.
Zuerst überprüfen wir immer, ob der entsprechende Pfad in der Registry auch existiert. Wenn nicht dann wird er angelegt.
Powershell One-Liners
Powershell One-Liners Part 1
If((Test-Path ‚HKLM:\Software\Policies\Microsoft\Windows\Personalization‘) -eq $false ) { New-Item -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Personalization‘ -force -ea SilentlyContinue }
# Den Sperrbildschirm nicht anzeigen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Personalization‘ -Name ‚NoLockScreen‘ -Value 1 -ea SilentlyContinue
# Kamera am Sperrbildschirm deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Personalization‘ -Name ‚NoLockScreenCamera‘ -Value 1 -ea SilentlyContinue
# Verhindern das der Sperrbildschirm und das Anmeldebild verändert wird
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Personalization‘ -Name ‚NoChangingLockScreen‘ -Value 1 -ea SilentlyContinue
# DNS Server auf der Netzwerkkarte setzen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚NameServer‘ -Value ‚fritz.box‘ -ea SilentlyContinue
# Primären DNS-Suffix setzen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\System\DNSClient‘ -Name ‚NV PrimaryDnsSuffix‘ -Value ‚dwp.local‘ -ea SilentlyContinue
# PTR Eintrag registrieren sofern Host Eintrag existiert
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚RegisterReverseLookup‘ -Value 2 -ea SilentlyContinue
# PTR Eintrag registrieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚RegisterReverseLookup‘ -Value 1 -ea SilentlyContinue
# Intervall für den Refresh von A und PTR Einträgen setzen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚RegistrationRefreshInterval‘ -Value 1800 -ea SilentlyContinue
# TTL für A und PTR Einträge festlegen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚RegistrationTtl‘ -Value 600 -ea SilentlyContinue
# Nur sichere dynamische DNS Updates
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚UpdateSecurityLevel‘ -Value 256 -ea SilentlyContinue
# Sichere und unsichere dynamische DNS Updates zulassen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient‘ -Name ‚UpdateSecurityLevel‘ -Value 0 -ea SilentlyContinue
# Netzwerkerkennung LLTDIO Richtlinie und Einstellung deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\LLTD‘ -Name ‚EnableLLTDIO‘ -Value 0 -ea SilentlyContinue
Remove-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\LLTD‘ -Name ‚AllowLLTDIOOnDomain‘ -ea SilentlyContinue
# Link Layer Topology Discovery Policy und Einstellung deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\LLTD‘ -Name ‚EnableRspndr‘ -Value 0 -ea SilentlyContinue
Remove-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\LLTD‘ -Name ‚AllowRspndrOnDomain‘ -ea SilentlyContinue
# Das Netzwerksymbol „Nur lokaler Zugriff“ soll nicht angezeigt
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Network Connections‘ -Name ‚NC_DoNotShowLocalOnlyIcon‘ -Value 1 -ea SilentlyContinue
# Verbietet die Verwendung der Internetverbindungsfirewall im DNS-Domänennetzwerk
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Network Connections‘ -Name ‚NC_PersonalFirewallConfig‘ -Value 0 -ea SilentlyContinue
# Internetverbindungsfreigabe im Domänennetzwerk verbieten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Network Connections‘ -Name ‚NC_ShowSharedAccessUI‘ -Value 0 -ea SilentlyContinue
# Internet Proxy für Apps setzen
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkIsolation‘ -Name ‚DomainProxies‘ -Value ‚proxy.dwp.local‘ -ea SilentlyContinue
# Intranet Proxy für Apps setzen
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkIsolation‘ -Name ‚DomainLocalProxies‘ -Value ‚proxy.dwp.local‘ -ea SilentlyContinue
# Kontextmenü im Startmenü deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Explorer‘ -Name ‚DisableContextMenusInStart‘ -Value 1 -ea SilentlyContinue
# Dokumenten Historie deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer‘ -Name ‚NoRecentDocsHistory‘ -Value 1 -ea SilentlyContinue
# Zuletzt installierten Anwendungen nicht anzeigen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Explorer‘ -Name ‚HideRecentlyAddedApps‘ -Value 1 -ea SilentlyContinue
# Zugriff auf Herunterfahren, Neustart etc. verhindern
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer‘ -Name ‚HidePowerOptions‘ -Value 1 -ea SilentlyContinue
# Meist genutzten Programm nicht hervorheben
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer‘ -Name ‚NoStartMenuMFUprogramsList‘ -Value 1 -ea SilentlyContinue
# Festplattenkontingent aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚Enable‘ -Value 1 -ea SilentlyContinue
# Festplattenkontingentlimit und Warnmeldung bei 50 GB
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚Limit‘ -Value 50 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚LimitUnits‘ -Value 3 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚Threshold‘ -Value 50 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚ThresholdUnits‘ -Value 3 -ea SilentlyContinue
# Ereignis schreiben wenn Kontingentwarnstufe überschritten wurde
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota‘ -Name ‚LogEventOverThreshold‘ -Value 1 -ea SilentlyContinue
# Erlaubt nicht-Administratoren Treiber zu installieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\DriverInstall\Restrictions‘ -Name ‚AllowUserDeviceClasses‘ -Value 1 -ea SilentlyContinue
# Windows Update soll keine Treiber-Updates suchen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\DriverSearching‘ -Name ‚DontPromptForWindowsUpdate‘ -Value 1 -ea SilentlyContinue
# Verschlüsselung von RPC für VSS SMBv2 aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\fssProv‘ -Name ‚EncryptProtocol‘ -Value 1 -ea SilentlyContinue
# Löschbenachrichtigung auf allen Volumens deaktivieren 0=deaktiviert
Set-ItemProperty -Path ‚HKLM:\System\CurrentControlSet\Policies‘ -Name ‚DisableDeleteNotification‘ -Value 1 -ea SilentlyContinue
# Warnung bei zu großen Kerberos Tickets Richtlinie und Einstellung aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters‘ -Name ‚EnableTicketSizeThreshold‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters‘ -Name ‚TicketSizeThreshold‘ -Value 48000 -ea SilentlyContinue
# Credential Provider als Default zuweisen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚DefaultCredentialProvider‘ -Value ‚{cb82ea12-9f71-446d-89e1-8d0924e1256e}‘ -ea SilentlyContinue
| Credential Provider | CLSID |
|---|---|
| Smartcard Reader Selection Provider | {1b283861-754f-4022-ad47-a5eaaa618894} |
| Smartcard WinRT Provider | {1ee7337f-85ac-45e2-a23c-37c753209769} |
| PicturePasswordLogonProvider | {2135f72a-90b5-4ed3-a7f1-8bb705ac276a} |
| GenericProvider | {25CBB996-92ED-457e-B28C-4774084BD562} |
| NPProvider | {3dd6bec0-8193-4ffe-ae25-e08e39ea4063} |
| CngCredUICredentialProvider | {600e7adb-da3e-41a4-9225-3c0399e88c0c} |
| PasswordProvider | {60b78e88-ead8-445c-9cfd-0b87f74ea6cd} |
| PasswordProvider\LogonPasswordReset | {8841d728-1a76-4682-bb6f-a9ea53b4b3ba} |
| FaceCredentialProvider | {8AF662BF-65A0-4D0A-A540-A338A999D36F} |
| FaceCredentialProvider | {8AF662BF-65A0-4D0A-A540-A338A999D36F} |
| Smartcard Credential Provider | {8FD7E19C-3BF7-489B-A72C-846AB3678C96} |
| Smartcard Pin Provider | {94596c7e-3744-41ce-893e-bbf09122f76a} |
| WinBio Credential Provider | {BEC09223-B018-416D-A0AC-523971B639F5} |
| IrisCredentialProvider | {C885AA15-1764-4293-B82A-0586ADD46B35} |
| PINLogonProvider | {cb82ea12-9f71-446d-89e1-8d0924e1256e} |
| NGC Credential Provider | {D6886603-9D2F-4EB2-B667-1971041FA96B} |
| CertCredProvider | {e74e57b0-6c6d-44d5-9cda-fb2df5ed7435} |
| WLIDCredentialProvider | {F8A0B131-5F68-486c-8040-7E8FC3C85BB6} |
Powershell One-Liners Part 2
# Credential Provider ausschließen
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚ExcludedCredentialProviders‘ -Value ‚{cb82ea12-9f71-446d-89e1-8d0924e1256e}‘ -ea SilentlyContinue
# Dem Benutzer erlauben den Anmeldehintergrund zu ändern
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚UseOEMBackground‘ -Value 1 -ea SilentlyContinue
# Immer auf Netzwerk warten bevor man sich anmelden kann
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon‘ -Name ‚SyncForegroundPolicy‘ -Value 1 -ea SilentlyContinue
# Standard Anmeldedomäne konfigurieren
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚DefaultLogonDomain‘ -Value ‚dwp.local‘ -ea SilentlyContinue
# Dem Benutzer keine Kontodetails bei der Anmeldung anzeigen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚BlockUserFromShowingAccountDetailsOnSignin‘ -Value 1 -ea SilentlyContinue
# Kein Willkommensbildschirm anzeigen
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer‘ -Name ‚NoWelcomeScreen‘ -Value 1 -ea SilentlyContinue
# Schneller Benutzerwechsel ausblenden
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚HideFastUserSwitching‘ -Value 1 -ea SilentlyContinue
# Bildcode bei der Anmeldung (Anmeldeoption) verbieten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚BlockDomainPicturePassword‘ -Value 1 -ea SilentlyContinue
# Kein Windows Startup Sound abspielen
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚DisableStartupSound‘ -Value 1 -ea SilentlyContinue
# Den PDC kontaktieren, um das falsche eingegebene Kennwort des Benutzer zu überprüfen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Netlogon\Parameters‘ -Name ‚AvoidPdcOnWan‘ -Value 0 -ea SilentlyContinue
# Verlauf der Zwischenablage nicht speichern
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚AllowClipboardHistory‘ -Value 0 -ea SilentlyContinue
# Die Zwischenablage nicht auf anderen Geräten synchronisieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚AllowCrossDeviceClipboard‘ -Value 0 -ea SilentlyContinue
# Die Anmelde PIN des Benutzers nach 90 Tagen ändern
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚Expiration‘ -Value 90 -ea SilentlyContinue
# Die letzten Anmelde-PINS dürfen nicht benutzt werden
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚History‘ -Value 10 -ea SilentlyContinue
# Maximale Länge der Anmelde-PIN
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚MaximumPINLength‘ -Value 20 -ea SilentlyContinue
# Minimale Länge der Anmelde-PIN
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚MinimumPINLength‘ -Value 6 -ea SilentlyContinue
# Anmelde-PIN muss Ziffern enthalten
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚Digits‘ -Value 1 -ea SilentlyContinue
# Anmelde-PIN erwartet Kleinbuchstaben
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚LowercaseLetters‘ -Value 1 -ea SilentlyContinue
# Anmelde-PIN errwartet Großbuchstaben
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚UppercaseLetters‘ -Value 1 -ea SilentlyContinue
# Die Anmelde-PIN erwartet Sonderzeichen
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity‘ -Name ‚SpecialCharacters‘ -Value 1 -ea SilentlyContinue
# Festplatte nach 20 Minuten Inaktivität im Batteriemodus abschalten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Power\PowerSettings\6738E2C4-E8A5-4A42-B16A-E040E769756E‘ -Name ‚DCSettingIndex‘ -Value 20 -ea SilentlyContinue
# Festplatte nach 20 Minuten Inaktivität abschalten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Power\PowerSettings\6738E2C4-E8A5-4A42-B16A-E040E769756E‘ -Name ‚ACSettingIndex‘ -Value 60 -ea SilentlyContinue
# Notebook bei kritischem Batteriestand in Hibernate versetzen. Value 3 für Shutdown.
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546‘ -Name ‚DCSettingIndex‘ -Value 2 -ea SilentlyContinue
# Meldung bei zu kritischer Batterieleistung 20 Minuten verbleibend
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Power\PowerSettings\9A66D8D7-4FF7-4EF9-B5A2-5A326CA2A469‘ -Name ‚DCSettingIndex‘ -Value 20 -ea SilentlyContinue
# Die Leistung des Computers darf gedrosselt werden
Set-ItemProperty -Path ‚HKLM:\System\CurrentControlSet\Control\Power\PowerThrottling‘ -Name ‚PowerThrottlingOff‘ -Value 0 -ea SilentlyContinue
# RPC Endpunkt Zuordnung Authentifizierung einschalten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\Rpc‘ -Name ‚EnableAuthEpResolution‘ -Value 1 -ea SilentlyContinue
# Powershell-Skripte beim Hochfahren des Computers zuerst ausführen
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚RunComputerPSScriptsFirst‘ -Value 1 -ea SilentlyContinue
# Powershell-Skripte bei der Anmeldung zuerst ausführen
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚RunUserPSScriptsFirst‘ -Value 1 -ea SilentlyContinue
# Wartezeit definieren bevor die Gruppenrichtlinien abgearbeitet werden
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System‘ -Name ‚MaxGPOScriptWait‘ -Value 600 -ea SilentlyContinue
# Server Manager nach dem Anmelden nicht staten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Server\ServerManager‘ -Name ‚DoNotOpenAtLogon‘ -Value 1 -ea SilentlyContinue
# Hängende Applikationen automatisch beenden
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚AllowBlockingAppsAtShutdown‘ -Value 1 -ea SilentlyContinue
# Applikationen die das Herunterfahren verhindern beenden
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚AllowBlockingAppsAtShutdown‘ -Value 0 -ea SilentlyContinue
# Wiederherstellung des Systems erlauben
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows NT\SystemRestore‘ -Name ‚DisableSR‘ -Value 0 -ea SilentlyContinue
# SMART schreibt ein Event falls die Festplatte Probleme aufweist
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{29689E29-2CE9-4751-B4FC-8EFF5066E3FD}‘ -Name ‚DfdAlertTextOverride‘ -Value “ -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{29689E29-2CE9-4751-B4FC-8EFF5066E3FD}‘ -Name ‚ScenarioExecutionEnabled‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{29689E29-2CE9-4751-B4FC-8EFF5066E3FD}‘ -Name ‚EnabledScenarioExecutionLevel‘ -Value 2 -ea SilentlyContinue
# Die Gruppe der Administratoren erhält Zugriff auf die Roaming-Profile
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚AddAdminGroupToRUP‘ -Value 1 -ea SilentlyContinue
# Benutzerprofile die länger als 120 Tage nicht benutzte wurden werden gelöscht
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚CleanupProfiles‘ -Value 120 -ea SilentlyContinue
# Verhindern das sich Benutzer mit einem temporären Profil anmelden können
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚ProfileErrorAction‘ -Value 1 -ea SilentlyContinue
# Bitlocker Laufwerksverschlüsselungsmethode AES-XTS
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsOs‘ -Value 7 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsFdv‘ -Value 7 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsRdv‘ -Value 7 -ea SilentlyContinue
# Bitlocker Wiederherstellungsmethode zur Entschlüsselung für einen Benutzer
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚UseRecoveryPassword‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚UseRecoveryDrive‘ -Value 1 -ea SilentlyContinue
# Bitlocker erweiterte PIN Abfrage beim Startup
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\FVE‘ -Name ‚UseEnhancedPin‘ -Value 1 -ea SilentlyContinue
# Bitlocker Secure Boot aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\FVE‘ -Name ‚OSAllowSecureBootForIntegrity‘ -Value 1 -ea SilentlyContinue
# Bitlocker Wiederherstellungmethode der Systemplatte
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSManageDRA‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSRecoveryPassword‘ -Value 2 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSRecoveryKey‘ -Value 2 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSHideRecoveryPage‘ -Value 0 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSActiveDirectoryBackup‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSActiveDirectoryInfoToStore‘ -Value 1 -ea SilentlyContinue
# Bitlocker softwarebasierte Verschlüsselung einsetzen
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSAllowSoftwareEncryptionFailover‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSRestrictHardwareEncryptionAlgorithms‘ -Value 0 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSAllowedHardwareEncryptionAlgorithms‘ -Value “ -ea SilentlyContinue
# Bitlocker Passwortkomplexitiät für Systemplatte aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\FVE‘ -Name ‚OSPassphraseComplexity‘ -Value 2 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\FVE‘ -Name ‚OSPassphraseLength‘ -Value 10 -ea SilentlyContinue
# Bitlocker Standard-Benutzern das Ändern der PIN untersagen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\FVE‘ -Name ‚DisallowStandardUserPINReset‘ -Value 1 -ea SilentlyContinue
# Bitlocker Vollverschlüsselung der Systemplatte erzwingen
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚OSEncryptionType‘ -Value 0 -ea SilentlyContinue
# Bitlocker starke Cipher XTS-AES-256 zur Verschlüsselung aktiviereb
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsOs‘ -Value 7 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsFdv‘ -Value 7 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Policies\Microsoft\FVE‘ -Name ‚EncryptionMethodWithXtsRdv‘ -Value 7 -ea SilentlyContinue
# Die Benutzung der Kamera erlauben (z.B. Notebook intern)
Set-ItemProperty -Path ‚HKLM:\software\Policies\Microsoft\Camera‘ -Name ‚AllowCamera‘ -Value 1 -ea SilentlyContinue
# Schaltfläche zur Anzeige (Anmeldeinformation) des eingegebenen Passworts deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\CredUI‘ -Name ‚DisablePasswordReveal‘ -Value 1 -ea SilentlyContinue
# Anzeigen aller lokalen Admin-Konten am Anmeldebildschirm
Set-ItemProperty -Path ‚HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI‘ -Name ‚EnumerateAdministrators‘ -Value 1 -ea SilentlyContinue
# Verhindern das Benutzer Sicherheitsfragen hinterlegen können
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚NoLocalPasswordResetQuestions‘ -Value 1 -ea SilentlyContinue
# Event-Logs für Anwendungen automatisch speichern wenn Speicher voll
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application‘ -Name ‚AutoBackupLogFiles‘ -Value -ea SilentlyContinue
# Anwendungs-Logs in C:\Logs speichern
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application‘ -Name ‚File‘ -Value ‚C:\Logs‘ -ea SilentlyContinue
# Maximale Größe für Anwendungs-Logs 128 MB
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application‘ -Name ‚MaxSize‘ -Value 131072 -ea SilentlyContinue
# Event-Logs für Sicherheit automatisch speichern wenn Speicher voll
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security‘ -Name ‚AutoBackupLogFiles‘ -Value -ea SilentlyContinue
# Sicherheit-Logs in C:\Logs speichern
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security‘ -Name ‚File‘ -Value ‚C:\Logs‘ -ea SilentlyContinue
# Maximale Größe für Sicherheits-Logs 128 MB
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security‘ -Name ‚MaxSize‘ -Value 131072 -ea SilentlyContinue
# Wichtige Event werden mit einem Zertifikat verschlüsselt wenn vorhanden
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\ProtectedEventLogging‘ -Name ‚EnableProtectedEventLogging‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\EventLog\ProtectedEventLogging‘ -Name ‚EncryptionCertificate‘ -Value
# Windows Defender Smart Screen aktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚EnableSmartScreen‘ -Value 1 -ea SilentlyContinue
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\System‘ -Name ‚ShellSmartScreenLevel‘ -Value Block -ea SilentlyContinue
# Benachrichtung das neue Software installiert wurde deaktivieren
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Explorer‘ -Name ‚NoNewAppAlert‘ -Value 1 -ea SilentlyContinue
# Ruhezustand in den Power-Optionen nicht anzeigen
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Explorer‘ -Name ‚ShowHibernateOption‘ -Value 0 -ea SilentlyContinue
# Die Datenausführungsverhinderung im Windows Explorer abschalten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\Explorer‘ -Name ‚NoDataExecutionPrevention‘ -Value 1 -ea SilentlyContinue
# Dateihistorie im Windows Explorer abschalten
Set-ItemProperty -Path ‚HKLM:\Software\Policies\Microsoft\Windows\FileHistory‘ -Name ‚Disabled‘ -Value 1 -ea SilentlyContinue

