Centralized PowerShell scripts for IT administration with on-the-fly execution from GitHub.
Repository: https://github.com/StoicTurk182/IT-Scripts
iex (irm "https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Menu.ps1")If TLS errors occur (older systems):
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex (irm "https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Menu.ps1")IT-Scripts/
├── Menu.ps1
├── README.md
├── ActiveDirectory/
│ ├── migrate_groups/
│ │ └── migrate_user_group_memberships_param.ps1
│ └── Rename-UPN/
│ └── UPN_NameChange.ps1
├── Setup/
│ └── HWH/
│ └── hwh.ps1
├── Utils/
│ ├── BACKUPS/
│ │ └── Create_Folders_v2.ps1
│ ├── Install-standard-apps/
│ │ └── Install-StandardApps.ps1
│ ├── Set Screen Lock/
│ │ └── Set-AutoLock.ps1
│ ├── Export App JSON/
│ │ └── App Export_JSON.ps1
│ └── Windows mgmt/
│ └── Win11-FeatureManager.ps1
└── Windows Autopilot Deployment_WINhome/
├── Create_Bypass.ps1
└── Install_AnyBurn.ps1
| Script | File | Description |
|---|---|---|
| Copy User Groups | migrate_user_group_memberships_param.ps1 | Copy groups from Source to Target user |
| UPN Name Change | UPN_NameChange.ps1 | Change user UPN and display name |
| Script | File | Description |
|---|---|---|
| Get Hardware Hash | hwh.ps1 | Collect Autopilot hardware hash |
| Script | File | Description |
|---|---|---|
| Create Backup Folders | Create_Folders_v2.ps1 | Create backup folder structure for migrations |
| Install Standard Apps | Install-StandardApps.ps1 | Auto-installs Winget, 7-Zip, and Notepad++ |
| Set Screen Lock | Set-AutoLock.ps1 | Set Windows Auto-Lock timeout for user and machine |
| Export App JSON | App Export_JSON.ps1 | Export list of installed applications to a text file |
| Windows mgmt | Win11-FeatureManager.ps1 | Manage Windows 11 features and settings |
| Script | File | Description |
|---|---|---|
| Create_Bypass | Create_Bypass.ps1 | Create files for Windows ISO modification to prep for Home Edition |
| Install_AnyBurn | Install_AnyBurn.ps1 | Install AnyBurn for ISO editing |
| Cmdlet | Alias | Function |
|---|---|---|
| Invoke-RestMethod | irm | Downloads raw script content from URL |
| Invoke-Expression | iex | Executes the downloaded content in memory |
Scripts are fetched from GitHub and executed in memory without writing to disk. This bypasses file-based execution policy and ensures the latest version is always used.
Raw GitHub URL format:
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}
Main Menu
├── [1] Active Directory (2 scripts)
├── [2] Device Setup (1 script)
├── [3] Utilities (5 scripts)
├── [4] Windows Autopilot Deployment_WINhome (2 scripts)
├── [R] Reload Menu
└── [Q] Quit
Category Menu
├── [1-n] Select script to run
├── [B] Back to main menu
└── [Q] Quit
cd "C:\Users\Administrator\Andrew J IT Labs\IT-Scripts"
mkdir "Utils\NewScript"Copy-Item "C:\Source\NewScript.ps1" -Destination ".\Utils\NewScript\"Or create new:
code "Utils\NewScript\NewScript.ps1"Open Menu.ps1 and add entry to the appropriate category in $Script:MenuStructure:
"Utilities" = @(
@{ Name = "Create Backup Folders"; Path = "Utils/BACKUPS/Create_Folders_v2.ps1"; Description = "Create backup folder structure for migrations" }
@{ Name = "Install Standard Apps"; Path = "Utils/Install-standard-apps/Install-StandardApps.ps1"; Description = "Auto-installs Winget, 7-Zip, and Notepad++" }
@{ Name = "Set Screen Lock"; Path = "Utils/Set Screen Lock/Set-AutoLock.ps1"; Description = "Set Windows Auto-Lock timeout for user and machine" }
@{ Name = "Export App JSON"; Path = "Utils/Export App JSON/App Export_JSON.ps1"; Description = "Export list of installed applications to a text file" }
@{ Name = "Windows mgmt"; Path = "Utils/Windows mgmt/Win11-FeatureManager.ps1"; Description = "Manage Windows 11 features and settings" }
@{ Name = "New Script"; Path = "Utils/NewScript/NewScript.ps1"; Description = "Description of new script" }
)git add -A
git commit -m "Add: NewScript to Utilities"
git pushAdd a new ordered entry to $Script:MenuStructure in Menu.ps1:
$Script:MenuStructure = [ordered]@{
"Active Directory" = @(
# existing entries
)
"Device Setup" = @(
# existing entries
)
"Utilities" = @(
# existing entries
)
"Windows Autopilot Deployment_WINhome" = @(
# existing entries
)
"New Category" = @(
@{ Name = "Script Name"; Path = "NewCategory/Script.ps1"; Description = "Script description" }
)
}The [ordered] keyword preserves the display order of categories in the menu.
Each script entry requires three properties:
| Property | Purpose | Example |
|---|---|---|
| Name | Display name in menu | "Copy User Groups" |
| Path | Relative path from repo root | "ActiveDirectory/migrate_groups/migrate_user_group_memberships_param.ps1" |
| Description | Brief description shown below name | "Copy groups from Source to Target user" |
Path rules:
- Use forward slashes
/not backslashes - No leading slash
- Case-sensitive (must match actual filename)
- Spaces in folder names are allowed but not recommended
Pull before changes:
git pullCheck status:
git statusStage, commit, push:
git add -A
git commit -m "Add: Description of changes"
git pushiex (irm "https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Menu.ps1")notepad $PROFILEAdd:
function IT { iex (irm "https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Menu.ps1") }Type IT to launch.
iex (irm "https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Utils/Windows%20mgmt/Win11-FeatureManager.ps1")Note: Spaces in URLs must be encoded as %20.
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$env:USERPROFILE\Desktop\IT-Toolbox.lnk")
$Shortcut.TargetPath = "powershell.exe"
$Shortcut.Arguments = '-NoExit -Command "iex (irm https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Menu.ps1)"'
$Shortcut.Save()Copies Active Directory group memberships from a source user to a target user. Accepts parameters for source and target usernames.
Requirements: Active Directory PowerShell module, appropriate AD permissions.
Changes user UPN (User Principal Name) and display name in Active Directory.
Requirements: Active Directory PowerShell module, appropriate AD permissions.
Collects Windows Autopilot hardware hash for device enrollment. Exports to CSV for upload to Intune/Autopilot.
Requirements: Administrator rights, WMI access.
Creates standardised backup folder structure for user data migrations.
Automatically installs common applications using Winget: 7-Zip and Notepad++. Installs Winget if not present.
Requirements: Administrator rights, internet access.
Configures Windows auto-lock timeout settings for both user and machine policies.
Requirements: Administrator rights for machine-level settings.
Exports a list of all installed applications to a text/JSON file for documentation or migration planning.
Interactive menu-driven tool to manage Windows 11 features, privacy settings, services, and firewall rules. Includes capability access manager toggles, system settings, service management, and quick admin commands.
Requirements: Administrator rights for most operations.
Creates necessary files for Windows ISO modification to prepare for Windows Home Edition Autopilot deployment.
Downloads and installs AnyBurn, a lightweight ISO editing tool used for Windows ISO customisation.
Test the URL in a browser:
https://raw.githubusercontent.com/StoicTurk182/IT-Scripts/main/Path/To/Script.ps1
Check for:
- Case sensitivity mismatches
- Missing or extra slashes
- Spaces not encoded as %20 in direct URLs
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12Verify in Menu.ps1:
- Entry is inside correct category's
@()array - Uses
@{ }wrapper with semicolon separators - Path uses forward slashes
GitHub caches raw content for approximately 5 minutes. Wait and retry, or use [R] Reload Menu option.
- Invoke-RestMethod: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod
- Invoke-Expression: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression
- GitHub Raw Content: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file
- Git Documentation: https://git-scm.com/doc