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
| $raw = pnputil /enum-drivers | |
| # Split into chunks by blank lines | |
| $chunks = ($raw -join "`n") -split "(\r?\n){2,}" | |
| $drivers = foreach ($chunk in $chunks) { | |
| $props = @{ | |
| PublishedName = '' | |
| Provider = '' | |
| Class = '' |
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
| if ($PSVersionTable.PSVersion.Major -eq 7) { | |
| Write-Output "Powershell 7 Detected. Please run using the Windows built in Powershell." | |
| Write-Output "If debugging, press CTRL SHIFT P in VS Code to change session to Windows Powershell" | |
| exit | |
| } | |
| ### GLOBAL VAR ### | |
| $HKLM = [UInt32] "0x80000002" # HKEY_LOCAL_MACHINE | |
| $ProfileListKey = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" |
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
| ############################### | |
| # Snapraid Sync Helper Script # | |
| ############################### | |
| # this is a helper script that keeps snapraid parity info in sync with | |
| # your data. Here's how it works: | |
| # 1) it first calls diff to figure out if the parity info is out of sync | |
| # 2) if there are changed files (i.e. new, changed, moved or removed), | |
| # it then checks how many files were removed. | |
| # 3) if the deleted files exceed X (configurable), it triggers an | |
| # alert email and stops. (in case of accidental deletions) |