Powershell GUI fronted (WPF) to run categorized console scripts

⌈⌋ branch:  ClickyColoury


Artifact [f5a0f1a95b]

Artifact f5a0f1a95baeceba489282a424b54f37dd2e5ecf:

  • File tools/beta/netlogon_debug.ps1 — part of check-in [7d3b522d61] at 2018-05-16 18:15:02 on branch trunk — NETLOGON registry change to enable WinLogon debugging (user: mario size: 2520)

# api: multitool
# version: 0.2
# title: Netlogon.log enable
# description: Set NETLOGON debug parameters
# category: beta
# x_cat: registry
# icon: powershell
# type: inline
# key: b51
# doc: https://serverfault.com/questions/65265/finding-why-a-user-is-locked-out-in-active-directory,
#      https://support.microsoft.com/de-de/help/109626/enabling-debug-logging-for-the-netlogon-service
# status: beta
#
# Akin to running:
#  ❏ Nltest /DBFlag:2080FFFF
# on user machine.
#
# ➜ log should appear in C:\Windows\Debug\netlogon.log
#
# Disable again via 
#  ❏ Nltest /DBFlag:0
# on client


Param(
    $machine = (Read-Host "computer"),
    $user = (Read-Host "user")
)
$settings = @(
    @("\\$machine\HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters\DBFlag", (0x2080FFFF), "DWord"),
    @("\\$machine\HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters\MaximumLogFileSize", (2MB), "DWord")
)


#-- registry
ForEach ($tuple in $settings) {
    $regkey, $setval, $regtype = $tuple
    Write-Host -f Yellow "➜ $regkey := $setval"
    Set-RemoteRegistry $regkey $setval $regtype
}
Write-Host -f Gray "➩ Active after next reboot" 
Write-Host -f Gray "➩ See C:\windows\Debug\netlogon.log" 
Write-Host ""