Functions/Show-TrayIcons.ps1
function Show-TrayIcons { [CmdletBinding()] param ( ) $regLocation = "HKCU:\Control Panel\NotifyIconSettings\" if (Test-Path $regLocation) { $TrayIcons = Get-ChildItem $regLocation # $TrayIcons foreach ($t in $TrayIcons) { Write-Verbose $t.Name -Verbose $IsPromoted = Get-ItemProperty "registry::$($t)" -Name IsPromoted | Select-Object -ExpandProperty IsPromoted if ($IsPromoted -ne 1) { Set-ItemProperty "registry::$($t)" -Name IsPromoted -Value 1 -Verbose } # Get-ItemProperty "$($reglocation)\$($t)" -Name IsPromoted } } else { Write-Warning "Reg key `"$($regLocation)`" not found" } } |