You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
😎
asheroto
😎
🌎 Full Stack Developer 🔗 Systems Administrator 😎 Innovation through Automation 💯 Privacy Advocate ♥ Startup Facilitator
Remap the Windows 11 Copilot hardware key to launch ChatGPT Desktop via the native CopilotKey registry policy. Run as admin; reverts cleanly with -Revert.
Set-CopilotKeyToChatGPT
PowerShell script that makes ChatGPT Desktop available as a target for the Windows 11
Copilot hardware key.
It finds ChatGPT's MSIX AUMID, writes the CopilotKey\SetCopilotHardwareKey policy
under HKCU, verifies the value, and opens the "Customize Copilot key on the
keyboard" settings page so you can pick ChatGPT. The policy makes ChatGPT available
as a Copilot key choice; you still select it on that page to make it the active
target. Run with -Revert to remove the option.
Remap the Windows 11 Copilot hardware key to launch Claude Desktop via the native CopilotKey registry policy. Run as admin; reverts cleanly with -Revert.
Set-CopilotKeyToClaude
PowerShell script that makes Claude Desktop available as a target for the Windows 11
Copilot hardware key.
It finds Claude's MSIX AUMID, writes the CopilotKey\SetCopilotHardwareKey policy
under HKCU, verifies the value, and opens the "Customize Copilot key on the
keyboard" settings page so you can pick Claude. The policy makes Claude available
as a Copilot key choice; you still select it on that page to make it the active
target. Run with -Revert to remove the option.
Fixes common Windows sysprep failures: removes WidgetsPlatformRuntime (0x80073cf2), reinstalls MSDTC (0x80070424), disables reserved storage, and resets generalization state registry keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PowerShell script to control monitor power state: place all displays into standby with -TurnOff or wake them with -TurnOn.
Screen Controller (PowerShell)
A simple PowerShell script to reliably control monitor/display state.
This uses the same method as when a computer display times out through normal power settings. Unlike tools like ControlMyMonitor that change monitor hardware settings and actually power off the monitor, this script uses Windows messaging to place displays into standby (not a full power-off) and runs entirely in PowerShell with no external dependencies. You can wake the screens manually by moving the mouse or pressing a key and allowing a few seconds for them to resume, or wake them remotely through the script.
Use -TurnOff to put displays into standby, or -TurnOn to wake them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running Ubiquiti UniFi Controller as a Windows Service or on Startup (simply)
Warning
The UniFi Network Application is no longer supported by Ubiquiti. Migration to UniFi OS Server is recommended. See this script for user account setup and automatic startup.
Running the UniFi Network Controller as a Windows Service or on Startup
The controller will run fine using the built-in java.exe included with the UniFi software, so no additional installation is required for basic functionality. However, Ubiquiti recommends using Adoptium due to Oracle Java licensing concerns and to stay current with supported versions.
If you choose to follow that recommendation instead of using the bundled Java, refer to the official guide to determine the correct Java version for your UniFi release. If using Adoptium, update the path to java.exe to match your installed version (the
How to restore an offline OneDrive file. Resolving Issues with Restoring OneDrive Files from Image-Based Backups or Offline Drives.
Resolving Issues with Restoring OneDrive Files from Image-Based Backups or Offline Drives
Restoring files from an image-based backup or offline drives of a OneDrive folder can result in files appearing corrupted or inaccessible. This issue is often due to OneDrive's Files On-Demand feature, which stores placeholder files instead of the actual data locally. Additionally, even when files are fully downloaded, they may retain reparse point attributes that can prevent the files from opening correctly.
Common Scenarios Affected
This problem can occur with image-based backup solutions or when restoring files from offline drives if the backup includes placeholders instead of the actual file data. The following software are examples of those which may be impacted.