Anduin Xue

let today = new Beginning();

PowerShell


快速配置 - 无痛让你的所有 Git Commit 都被 GPG 数字签名

这篇博客详细介绍了如何使用 GPG 对 Git Commit 进行数字签名,为了防止他人伪造你的 Commit,提高安全性。首先,介绍了 GPG 签名的原理和作用,然后详细阐述了如何下载并安装 GPG,生成 Key,设置 Git Commit 使用这个 Key,让 GitHub、GitLab 信任你的公钥,并提出了跨设备同步你的 Key 的方法。通过这些步骤,你的 Git Commit 都会显示受信任的,不再会被黑客仿冒。但是,跨设备同步你的 Key 的方法可能会带来安全风险,你需要权衡安全和方便。那么,你是否愿意牺牲一点儿安全来换取方便呢?你会如何选择?--GPT 4

bash git PowerShell SSH Nextcloud Sign GPG

Manually Enable Windows RE in an independent partition

This blog post provides a comprehensive guide on how to manually enable Windows RE (Recovery Environment) in an independent partition. It starts by highlighting the importance of having Windows RE enabled, which includes fixing boot-related issues, providing access to the command prompt for troubleshooting, facilitating a clean install of Windows, and reducing the risk of data loss or corruption. The blog then outlines the steps to automatically and manually enable Windows RE, including dealing with potential error messages related to BitLocker Drive Encryption. It also provides a guide on debugging RE and a checklist of other security measures to ensure the reliability of Windows. These include enabling virtualization technology, secure boot, TPM chip, BitLocker, firewall, and UAC. The blog also discusses the optional use of the Unified Write Filter. Will you be able to enable Windows RE manually after reading this? What other measures do you take to ensure the security and reliabilit...--GPT 4

Windows 10 PowerShell Security Windows 11 Bcdedit Windows RE Recovery reagentc Diskpart

Remove the Bing button from Edge

本篇博客主要讲述了如何在Microsoft Edge浏览器中移除Bing按钮、禁用圆角和禁用头像功能。首先,通过运行具有管理员权限的PowerShell命令来移除Bing按钮。接着,打开edge://policy/页面,按照博客中的步骤操作即可。接下来,禁用圆角功能需要访问edge://flags/页面,分别禁用两个选项,然后重启Edge浏览器,传统的标签页样式便会回归。最后,访问edge://flags页面,将指定选项设置为禁用,即可关闭头像功能。 本文详细阐述了如何自定义Edge浏览器的外观,让其更符合个人使用习惯。在阅读本文后,你是否也想尝试调整自己的浏览器设置呢?此外,还有哪些浏览器功能可以通过类似方法进行调整?希望本文能够帮助你找到答案。--GPT 4

PowerShell Edge Bing

Install WinGet on Windows Server

在本篇博客中,我们将学习如何在Windows Server上安装WinGet。首先,确保您没有使用管理员帐户运行。然后,在具有管理员权限的新PowerShell会话中运行一系列命令。这些命令将帮助您查询最新的WinGet版本及其依赖项,并下载与安装适用于您系统的软件包。 尽管在安装过程中可能会遇到一些临时性错误,但完成后WinGet应该已经成功安装。如果安装失败,请按照博客中的步骤从GitHub下载并安装WinGet及其许可证。完成后,您应该可以看到WinGet已在您的系统中生效。 安装WinGet后,您可以使用它来安装Windows Terminal。尝试使用命令`winget install Microsoft.WindowsTerminal`。如果安装失败,您可以尝试在PowerShell中运行另一个命令来进行安装。此外,您还可以使用WinGet来安装其他应用,如剪贴工具、便笺、时钟以及邮件和日历。 最后,如果需要重置Windows商店,可以尝试在PowerShell(管理员权限)中运行`wsreset -i`和`wsreset`命令。请注意,这仅支持Windows 10 LTSC,可能无法在Windows Server上工作。 在阅读完整篇博客后,您是否已经掌握了如何在Windows Server上安装WinGet的方法?您还有哪些关于WinGet的其他应用和技巧可以分享呢?--GPT 4

PowerShell Windows Server Install Winget Automation

Install Windows 11 on Vultr cloud machine

本篇博客详细介绍了如何在Vultr云服务器上安装Windows 11。首先,我们需要下载Windows 11的ISO文件,并将其转换为WIM文件。接着,准备一个新的磁盘驱动器以供安装Windows 11。在完成这些准备工作后,我们需要解压Windows 11的WIM文件,然后设置相应的启动配置。重启服务器后,通过VNC连接并完成Windows 11的初始设置。最后,启用远程桌面服务并删除旧的Windows Server。 在阅读这篇博客后,你会了解到在云服务器上安装Windows 11的整个过程。这将有助于你在云端搭建自己的个人电脑,并随时随地通过远程桌面连接使用。此外,你还可以为家人和朋友创建更多的云电脑,让他们也能随时随地体验Windows 11的便捷。 那么,云电脑的未来会是怎样的呢?随着技术的发展,云电脑是否会成为我们日常生活中不可或缺的一部分?请继续关注我们的博客,探讨云电脑的未来趋势!--GPT 4

PowerShell Windows Server Cloud Windows Windows 11 DISM Bcdedit Vultr Cloud PC

Use Windows as a stateless OS on your devices

本篇博客详细讲解了如何在设备上将Windows作为无状态操作系统使用。文章提供了一系列PowerShell脚本,用于优化和自定义Windows设置,包括更改桌面图标、禁用睡眠模式、启用中文输入法、移除蓝牙图标、调整文件资源管理器设置、设置时区和时间、调整鼠标速度、固定文件夹到快速访问、启用深色主题、清理桌面、设置网络连接属性以及启用远程桌面连接等。此外,文章还介绍了如何使用winget命令升级所有应用程序以及检查并安装Windows更新。 在阅读本文后,您是否会考虑使用这些脚本来优化您的Windows设备?这些设置对您的日常使用有何影响?在实践中,您还需要哪些其他自定义设置?请阅读全文,了解如何借助这些脚本让您的Windows设备更符合您的需求,并尝试自己寻找答案。--GPT 4

PowerShell Windows Windows 11 Automation Configuration Device Reimage

Install Windows store app with WinGet

This blog post demonstrates how to install a Microsoft Store app using WinGet, a Windows package manager. The process begins by obtaining the Store App ID from the Microsoft official website. Once the App ID is acquired, you can use a command to open the store page or create a PowerShell script to launch the store automatically. To install the app without a prompt, first, install WinGet using a provided script, and then run another command with the store app ID. For developers building automation, this blog post also provides a script to check if the app is already installed using the exact WinGet app name. If it's not installed, the script attempts to download and install the app. A function called Install-StoreApp is provided, making it even easier to install Microsoft Store apps with WinGet. Examples of using this function with various app IDs and WinGet app names are also included. How can you adapt these scripts for your own automation needs? And what other applications can be...--GPT 4

PowerShell Windows Winget Microsoft Store UWP Store

Install Windows 11 side-by-side without a USB drive

本篇博客文章介绍了如何在不使用USB驱动器的情况下,与现有操作系统并行安装Windows 11。首先,需要获取Windows 11的ISO文件并找到其中的Install.wim(或Install.esd)文件。接下来,在计算机上创建一个新的、干净的分区,用于安装新的Windows系统。然后,提取install.wim(esd)文件到新分区,并为新Windows添加启动项。最后,重启计算机,在启动菜单中选择新安装的操作系统即可。 在完成这个过程的过程中,你可能会遇到一些问题。例如,如何选择正确的Windows版本进行安装?如何确保新分区足够大以容纳新的操作系统?如何正确地将install.wim(esd)文件提取到新分区?以及如何确保新分区能够正常启动新的操作系统?本文详细解答了这些问题,并提供了相应的解决方案,如使用7zip打开install.wim(esd)文件,查找适合的Windows版本;使用磁盘管理工具创建新分区;以及使用命令行工具(如dism和bcdedit)完成文件提取和添加启动项等操作。 在阅读本文后,你将能够顺利地完成Windows 11的并行安装,无需依赖USB驱动器。但在实际操作过程中,你可能还会遇到其他问题,如何解决这些问题?尝试阅读全文,从中找到答案。--GPT 4

Windows 10 PowerShell Windows Windows 11 Install DISM Bcdedit Boot BCD

The simplest way to retry in PowerShell

本篇博客详细介绍了如何在PowerShell中使用简单的方法进行重试操作。这种方法主要利用了do-try-catch-until语句,当执行某个具有较高崩溃概率的操作时,可以自动进行重试操作。在示例中,作者使用ping命令来演示这种重试机制。当ping失败时,程序会捕获到异常,并根据已尝试的次数来决定是否继续重试,直到成功或达到最大尝试次数。 在这个过程中,我们可以看到程序会在每次重试前输出当前尝试次数以及接下来的等待时间。这有助于我们了解程序的运行状态,同时可以根据需要调整等待时间。当达到最大尝试次数后,程序会抛出错误,并在日志中记录详细信息。 那么,如何使用这种重试机制来优化我们的脚本呢?在什么场景下这种重试机制会发挥最大作用?如何根据实际需求调整重试次数和等待时间?这篇博客为你提供了一个简单易懂的示例,帮助你更好地了解PowerShell中的重试机制。阅读全文,你将能够找到这些问题的答案,并学会如何在自己的PowerShell脚本中应用这种重试方法。--GPT 4

PowerShell Retry

Enable PowerShell remoting for Windows Server machines

本篇博客主要讲述了如何在Windows Server上启用PowerShell远程功能。就像在Linux机器上使用SSH执行远程命令一样,你也可以在目标Windows Server上执行远程PowerShell命令。博客提供了详细的步骤,包括使用自签名证书启用HTTPS远程功能、配置监听地址以及在本地机器上通过PowerShell连接到服务器。 首先,我们需要在服务器上执行一系列命令来移除旧的监听器、创建自签名证书并启用HTTPS远程功能。接下来,在本地机器上执行命令来跳过CA检查(因为我们使用的是自签名证书),然后输入服务器的计算机名、SSL选项、端口号、会话选项和凭据。之后,系统会提示输入密码。 如果一切顺利,你将成功连接到服务器。但如果无法连接,可能是因为端口被阻止了。此时,可以在服务器上执行命令来解除端口阻止。 本文详细介绍了在Windows Server上启用PowerShell远程功能的方法,以及如何解决可能遇到的问题。那么,你是否已经准备好尝试这些操作,实现在Windows Server上的远程PowerShell功能呢?--GPT 4

PowerShell Windows Server Remote Management WMI

Install Azure CLI on Windows 10 and use it in bash

在这篇博客中,我们将学习如何在Windows 10上安装Azure CLI并在bash中使用它。Azure命令行界面(CLI)是微软为管理Azure资源而设计的跨平台命令行体验。Azure CLI旨在易于学习和上手,同时功能强大,足以成为构建自定义自动化以使用Azure资源的绝佳工具。 Azure CLI可以在Windows,macOS和Linux环境中安装。它还可以在Docker容器和Azure Cloud Shell中运行。 在PowerShell中安装Azure CLI非常简单。只需执行以下命令: Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet' 然后,您可以直接使用它。 但是,如果在git-bash中执行`az`,它会告诉您找不到`az`。这是因为`az`是一个名为az.cmd的文件,因此bash不会将其视为bash中的命令。 那么我们如何在bash中使用az并编写az shell呢? 安装Azure CLI后,使用管理员权限打开一个新的bash实例。 然后执行以下命令: echo \"C:\\Program Files \(x86\)\\Microsoft SDKs\\Azure\\CLI2\\wbin\\az.cmd\" \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8 \$9 \${10} \${11} \${12} \${13} \${14} \${15} > "$SYSTEMROOT\az" 这将在系统根目录下创建一个名为az的新bash可执行文件。 现在尝试在bash中执行az命令。 通过这篇博客,您将了解如何在Windows 10上安装和使用Azure CLI。这将有助于您更好地管理Azure资源并构建自定义自动化。那么,您准备好在bash中使用Azure CLI了吗?--GPT 4

bash Azure Azure CLI PowerShell

  • 1