Wolfgang Sommergut
Blogs, Articles, and Posts
Activate BitLocker with manage-bde, PowerShell, or WMI
(4sysops.com)
You can configure various settings for BitLocker using group policies, but this doesn't initiate
By: Wolfgang Sommergut submitted:Sep 22 2023
You can configure various settings for BitLocker using group policies, but this doesn't initiate
encryption. Similarly, it doesn't create the configured protectors that are necessary for activating BitLocker. Manage-bde, PowerShell, or the WMI class Win32_EncryptableVolume serve this purpose.
By: Wolfgang Sommergut submitted:Sep 22 2023
Add updates (.msu) offline into Windows images (.wim)
(4sysops.com)
Before deployment, Microsoft ISO's install .wim or custom images should be updated. With the DISM
By: Wolfgang Sommergut submitted:Feb 2 2024
Before deployment, Microsoft ISO's install .wim or custom images should be updated. With the DISM
module in PowerShell, you can add .msu updates, apps, and drivers to a Windows image offline without the need to boot it up.
By: Wolfgang Sommergut submitted:Feb 2 2024
Audit Group Policy changes in the event log using XML queries and PowerShell
(4sysops.com)
Custom views in the Event Viewer allow you to filter the metadata of log entries based on various
By: Wolfgang Sommergut submitted:Jul 12 2024
Custom views in the Event Viewer allow you to filter the metadata of log entries based on various
criteria. However, these filters do not assess the content of the log entry messages. To evaluate the log messages, you can extend filters using an XPath query. The examples below demonstrate how to audit Group Policy changes with XML queries, which you can further process with PowerShell.
By: Wolfgang Sommergut submitted:Jul 12 2024
Build a Windows Server 2025 S2D cluster lab with Hyper-V and PowerShell
(4sysops.com)
To explore Storage Spaces Direct (S2D) in Windows Server 2025, you can set up a lab environment
By: Wolfgang Sommergut submitted:Oct 11 2024
To explore Storage Spaces Direct (S2D) in Windows Server 2025, you can set up a lab environment
using virtual machines with Hyper-V and PowerShell.
By: Wolfgang Sommergut submitted:Oct 11 2024
Configure attack surface reduction in Microsoft Defender using Group Policy or PowerShell
(4sysops.com)
In addition to the virus scanner, Microsoft Defender offers other security functions. These include
By: Wolfgang Sommergut submitted:Aug 19 2022
In addition to the virus scanner, Microsoft Defender offers other security functions. These include
the reduction of the attack surface, which hardens applications such as Office, browsers, and Adobe Reader. The feature is not active by default and can be configured via group policies or PowerShell.
By: Wolfgang Sommergut submitted:Aug 19 2022
Create, configure, and delete system restore points with PowerShell, vssadmin.exe, and System Properties
(4sysops.com)
System restore points allow users to roll back Windows to an earlier state if problems arise. These
By: Wolfgang Sommergut submitted:Jun 28 2024
System restore points allow users to roll back Windows to an earlier state if problems arise. These
points capture important system files, the registry, and drivers. In addition to using the System Properties applet, you can manage system restore points with PowerShell and vssadmin.exe.
By: Wolfgang Sommergut submitted:Jun 28 2024
Deploy Windows 11 with the free PowerShell framework OSDCloud
(4sysops.com)
OSDCloud is a free PowerShell framework for deploying Windows 10 and Windows 11. The tool provides
By: Wolfgang Sommergut submitted:May 31 2024
OSDCloud is a free PowerShell framework for deploying Windows 10 and Windows 11. The tool provides
simple methods for adding drivers and configuring settings in an image. After booting from a customized WinPE, either the OSDCloudGUI or an automated script initiates the installation.
By: Wolfgang Sommergut submitted:May 31 2024
Find enabled local Group Policy settings with rsop.msc and PowerShell
(4sysops.com)
When it comes to GPO troubleshooting, you might want to find settings that are configured by local
By: Wolfgang Sommergut submitted:Aug 11 2023
When it comes to GPO troubleshooting, you might want to find settings that are configured by local
Group Policy. With rsop.msc, a graphical tool is available for this purpose. However, it is generally more efficient to generate a report using gpresult.exe and evaluate it with PowerShell.
By: Wolfgang Sommergut submitted:Aug 11 2023
How to change the PowerShell prompt
(4sysops.com)
All modern shells and command lines offer a prompt that provides the user with essential information
By: Wolfgang Sommergut submitted:Mar 24 2023
All modern shells and command lines offer a prompt that provides the user with essential information
about his context. By default, however, PowerShell displays only the current directory. Since its appearance is determined by a function, you can change the PowerShell prompt easily.
By: Wolfgang Sommergut submitted:Mar 24 2023
How to map a network drive with PowerShell
(4sysops.com)
If you want to assign a drive letter to file shares via the command line, you can use PowerShell
By: Wolfgang Sommergut submitted:May 19 2023
If you want to assign a drive letter to file shares via the command line, you can use PowerShell
instead of net.exe. The SmbShare module's cmdlets can display, connect, and disconnect shared drives. PowerShell also supports newer SMB features, such as QUIC and Compression.
By: Wolfgang Sommergut submitted:May 19 2023
Install Windows Terminal without the Store (on Windows Server)
(4sysops.com)
Microsoft has made its new terminal for multiple shells and command line programs available as a
By: Wolfgang Sommergut submitted:Jul 8 2022
Microsoft has made its new terminal for multiple shells and command line programs available as a
Store app. However, if you want to install the package with PowerShell because, for example, there is no Store app on Windows Server or Windows 10 LTSC, you'll get an error message due to a missing library.
By: Wolfgang Sommergut submitted:Jul 8 2022
New in Windows Terminal: Restore buffers, code snippets, scratchpad and regex
(4sysops.com)
Windows Terminal unveiled a range of noteworthy features in versions 1.21 and 1.22 Preview,
By: Wolfgang Sommergut submitted:Sep 6 2024
Windows Terminal unveiled a range of noteworthy features in versions 1.21 and 1.22 Preview,
including the capacity to retrieve previous sessions' output buffer upon startup, store code snippets for reuse within the console, and utilize a scratchpad for crafting intricate commands.
By: Wolfgang Sommergut submitted:Sep 6 2024
Partition Windows drive in WinPE using PowerShell
(4sysops.com)
An essential step towards automating the Windows setup process is replacing the system drive's
By: Wolfgang Sommergut submitted:May 3 2024
An essential step towards automating the Windows setup process is replacing the system drive's
interactive partitioning with a script. Microsoft's examples for this purpose rely on batch files and Diskpart. However, installing PowerShell in Windows PE allows for a much more elegant solution.
By: Wolfgang Sommergut submitted:May 3 2024
Recover data from corrupted BitLocker drives with repair-bde and key packages
(4sysops.com)
Activating BitLocker encryption on a drive automatically generates a 48-digit numeric recovery
By: Wolfgang Sommergut submitted:Sep 13 2024
Activating BitLocker encryption on a drive automatically generates a 48-digit numeric recovery
password. This password is crucial if other unlocking methods fail and Windows prompts you with the BitLocker recovery console during startup.
By: Wolfgang Sommergut submitted:Sep 13 2024
Remove store apps from a Windows image
(4sysops.com)
In professional environments, most store apps delivered with Windows are of little value, prompting
By: Wolfgang Sommergut submitted:May 24 2024
In professional environments, most store apps delivered with Windows are of little value, prompting
admins to remove them from the image before deployment. However, you should avoid indiscriminately deleting them, as some system-relevant apps may be among them. PowerShell can be used to remove the crapware selectively.
By: Wolfgang Sommergut submitted:May 24 2024
Resolve-DnsName: nslookup for PowerShell
(4sysops.com)
nslookup has established itself as a popular tool for troubleshooting DNS problems. It exists on
By: Wolfgang Sommergut submitted:May 5 2023
nslookup has established itself as a popular tool for troubleshooting DNS problems. It exists on
multiple platforms, including Windows. However, there is an alternative, the PowerShell Resolve-DnsName cmdlet, which can also check proprietary Microsoft protocols for name resolution, such as NetBIOS or LLMNR.
By: Wolfgang Sommergut submitted:May 5 2023
Restore classic context menu in Windows 11 Explorer using Group Policy or PowerShell
(4sysops.com)
Alongside the revamped Start Menu, one of the most noticeable changes in Windows 11 is the
By: Wolfgang Sommergut submitted:Oct 4 2024
Alongside the revamped Start Menu, one of the most noticeable changes in Windows 11 is the
redesigned context menu in File Explorer. However, these modifications are not merely aesthetic - they also restrict its functionality. You can deploy a registry key using Group Policy Preferences to restore the classic context.
By: Wolfgang Sommergut submitted:Oct 4 2024
Send email notifications about expiring Active Directory passwords with a PowerShell script
(4sysops.com)
Enforcing a policy for regular password changes is no longer recommended, as it can result in more
By: Wolfgang Sommergut submitted:Aug 23 2024
Enforcing a policy for regular password changes is no longer recommended, as it can result in more
helpdesk requests due to expired passwords, especially for VPN users, and may actually undermine security. However, timely notifications can help mitigate issues when password changes are necessary. Learn how to notify users with Group Policy or a PowerShell script.
By: Wolfgang Sommergut submitted:Aug 23 2024
Trim characters from strings in PowerShell
(4sysops.com)
Most programming languages provide string functions that can be used to selectively truncate leading
By: Wolfgang Sommergut submitted:Mar 17 2023
Most programming languages provide string functions that can be used to selectively truncate leading
or trailing characters. String objects in PowerShell have three such trim() methods that remove not only spaces but also any characters at the beginning and end.
By: Wolfgang Sommergut submitted:Mar 17 2023
Uninstall programs (remotely) with PowerShell
(4sysops.com)
Microsoft offers several options if you want to remove installed programs by using the command line
By: Wolfgang Sommergut submitted:Jun 16 2022
Microsoft offers several options if you want to remove installed programs by using the command line
or a script. Unfortunately, no method covers all scenarios. PowerShell's package management, for example, is limited to the local computer, while WMI does not recognize all programs.
By: Wolfgang Sommergut submitted:Jun 16 2022
Unlock BitLocker drive from Windows PE with a PowerSell script
(4sysops.com)
BitLocker can pose a significant challenge when multiple PCs need to be booted from an external
By: Wolfgang Sommergut submitted:Aug 16 2024
BitLocker can pose a significant challenge when multiple PCs need to be booted from an external
drive for troubleshooting. The helpdesk must manually enter the 48-digit recovery password each time. However, this process can be automated by exporting the keys and using a script.
By: Wolfgang Sommergut submitted:Aug 16 2024
UserAccountControl attribute: Checking and configuring security settings for Active Directory accounts
(4sysops.com)
The UserAccountControl attribute can be used to configure several account settings in Active
By: Wolfgang Sommergut submitted:Oct 21 2022
The UserAccountControl attribute can be used to configure several account settings in Active
Directory. This applies, for example, to the expiration date of passwords or to Kerberos delegation. An AD audit should check this attribute regularly. This can be done using PowerShell, and there is a cmdlet for changing flags.
By: Wolfgang Sommergut submitted:Oct 21 2022