Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: PowerShell


Quick Setup - Painless GPG Digital Signatures for All Your Git Commits

This article provides a detailed walkthrough of the complete process for using GPG to digitally sign commits in Git, with the goal of preventing others from forging commit history. It first explains the role of GPG signatures in verifying the authenticity and integrity of documents, and guides users on installing GPG tools based on their operating system. Next, it demonstrates generating a key pair via the command line, retrieving the long-form Key ID, and configuring Git global settings to enable automatic signing. Key steps include exporting the public key and adding it to a GitHub or GitLab account, so that the platform trusts the signature, thereby ensuring that only users holding the private key can generate recognized commits. The article also explores convenient solutions for synchronizing keys across devices, suggesting storing the private key file on cloud storage services such as Nextcloud, and importing and configuring it on new devices with a one-click script. It simultaneously emphasizes the importance of enabling two-factor authentication (2FA) and protecting the private key passphrase to avoid security risks. Finally, it points out that after configuration, the public key should be shared with trusted colleagues or friends, who should also trust the public key. This ensures that GPG signatures truly deliver their security protection value in team collaboration, preventing the signature mechanism from becoming a mere formality.

Views 719
GPG Nextcloud PowerShell SSH Sign bash git





Install Windows 11 on a Vultr cloud machine ★

This article provides a detailed guide on setting up a Windows 11 cloud PC from scratch on a Vultr server. First, use the DISM tool to mount the `install.wim` image and inject the necessary drivers, then commit the changes and unmount the image. Next, use disk management tools to shrink the C drive and create a new E drive partition, then extract the Windows 11 system files to this partition. The core step involves using the `bcdedit` command to configure a new boot entry, setting the system boot path and recovery options to ensure that Windows 11 boots correctly after a reboot. After rebooting, connect via VNC to complete the initial setup (OOBE). During this process, be sure to select an offline account and set a strong password to avoid restrictions on Remote Desktop. Once you reach the desktop, enable the Remote Desktop service to connect via RDP. Finally, it is recommended to delete the old system partition, change the default port 3389 for remote connections to enhance security, and immediately create a system snapshot. This snapshot can serve as a template to quickly and batch-deploy independent Windows 11 cloud PCs for family or friends, enabling access from any device anytime, anywhere.

Views 1,898
Bcdedit Cloud Cloud PC DISM PowerShell Vultr Windows Windows 11 Windows Server

Use Windows as a stateless OS on your devices

This is a tutorial article on automated optimization scripts for the Windows operating system, designed to complete multiple system configurations in one go using PowerShell and CMD commands. The core content covers system cleanup and environment optimization, including emptying the Recycle Bin, removing startup items, deleting 3D objects, and cleaning up desktop files to enhance tidiness. In terms of performance and experience, the script sets the power plan to Ultimate Performance mode, disables sleep on AC power, disables mouse acceleration to optimize control, and forces the use of the dark theme and the Chinese input method. Network and security settings involve setting the network type to Private to enable more features, configuring UAC to the default protection level, and optionally enabling Remote Desktop connections. Additionally, the script addresses the active probing issue in Windows 11, synchronizes to China Standard Time, displays file extensions, pins the code repository to Quick Access, and finally uses Winget to batch upgrade applications and install Windows system updates. This script is suitable for developers or advanced users who want to quickly configure a development environment tailored to their personal preferences. However, some operations, such as emptying the desktop and changing network properties, carry risks and should be executed with caution.

Views 917
Automation Configuration Device PowerShell Reimage Windows Windows 11