Files
claudetools/.khalsa-diag4.ps1
Winter Williams eba471a61a sync: auto-sync from GURU-BEAST-ROG at 2026-07-16 10:11:10
Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-07-16 10:11:10
2026-07-16 10:13:18 -07:00

29 lines
1.7 KiB
PowerShell

$ErrorActionPreference='SilentlyContinue'
'=HOSTS (non-comment)='
Get-Content C:\Windows\System32\drivers\etc\hosts | Where-Object{$_ -match '\S' -and $_ -notmatch '^\s*#'}
'=WINHTTP PROXY='
netsh winhttp show proxy | Where-Object{$_ -match '\S'}
'=USER PROXY='
Get-ChildItem Registry::HKEY_USERS | Where-Object{$_.Name -match 'S-1-5-21' -and $_.Name -notmatch '_Classes'} | ForEach-Object{
$p=Get-ItemProperty ($_.PSPath+'\Software\Microsoft\Windows\CurrentVersion\Internet Settings')
"[$($_.PSChildName)] enable=$($p.ProxyEnable) server=$($p.ProxyServer) autocfg=$($p.AutoConfigURL)"
}
'=DNS='
Get-DnsClientServerAddress -AddressFamily IPv4 | Where-Object{$_.ServerAddresses} | ForEach-Object{ "$($_.InterfaceAlias): $($_.ServerAddresses -join ',')" }
'=BROWSER SEARCH/STARTUP='
Get-ChildItem "C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Preferences","C:\Users\*\AppData\Local\Microsoft\Edge\User Data\*\Preferences" | ForEach-Object{
$who=$_.FullName -replace '^C:\\Users\\([^\\]+).*','$1'
$j=Get-Content $_.FullName -Raw | ConvertFrom-Json
$sp=$j.default_search_provider_data.template_url_data.keyword
$su=($j.session.startup_urls -join ';')
$hp=$j.homepage
if($sp -or $su -or $hp){ "[$who $($_.Directory.Name)] search=$sp startup=$su home=$hp" }
}
'=BROWSER SHORTCUTS='
$sh=New-Object -ComObject WScript.Shell
Get-ChildItem 'C:\Users\*\Desktop\*.lnk','C:\Users\Public\Desktop\*.lnk','C:\Users\*\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk' | ForEach-Object{
$l=$sh.CreateShortcut($_.FullName)
if($l.TargetPath -match 'chrome|msedge|firefox|iexplore' -and $l.Arguments -match '\S'){ "$($_.FullName) -> $($l.TargetPath) ARGS: $($l.Arguments)" }
}
'=DONE STAGE4='