-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
⚙️ Issue Checklist
- I have read the guidelines.
- I checked for duplicate issues.
- I searched for existing discussions.
- I checked for an existing pull request that addresses this request.
❓ Is your feature request related to a problem?
Apply optimizations to all users instead of HKCU:
Update the script to do a for-each loop and apply the tweaks to each user that logs on, example:
💡 Describe the solution you'd like
Define the registry path for HKEY_USERS
$registryPath = "HKU:"
Get all subkeys under HKEY_USERS
$subKeys = Get-ChildItem -Path $registryPath
Loop through each subkey
foreach ($subKey in $subKeys) {
# Display the subkey name (SID)
Write-Host "SubKey (SID): $($subKey.PSChildName)"
# Check if the subkey has a specific value (e.g., Environment variables)
$envKeyPath = "$($subKey.PSPath)\Environment"
if (Test-Path $envKeyPath) {
$envValues = Get-ItemProperty -Path $envKeyPath
Write-Host "Environment Variables:"
$envValues.PSObject.Properties | ForEach-Object {
Write-Host " $($_.Name): $($_.Value)"
}
} else {
Write-Host "No Environment Variables found for this user."
}
Write-Host "-----------------------------------"
}
🔄 Describe alternatives you've considered
No response
🖼️ Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request