I just saw a very, very handy thing on Twitter where you can set a registry key that will automatically accept all EULA prompts for the SysInternals tools. I know there is a command-line switch I can use, but I never remember to use it. Setting the registry key appears to accept EULAs globally. Naturally, I wanted a PowerShell script I could run.
Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
#set global EULA acceptance for SysInternals tools
[CmdletBinding(SupportsShouldProcess)]
Param([switch]$Passthru)
$regPath = "HKCU:\Software\Sysinternals"
Set-ItemProperty -Path $regPath -Name "EulaAccepted" -Value 1 -Force
if ($Passthru) {
Get-ItemProperty -Path $regPath -Name EulaAccepted
}
This is a script file that supports -Whatif. Since the setting is for the current user, no elevation is required.
PS C:\> C:\scripts\Set-SysInternalsEula.ps1 -WhatIf
What if: Performing the operation "Set Property" on target "Item: HKEY_CURRENT_USER\Software\Sysinternals Property: EulaAccepted".
PS C:\> C:\scripts\Set-SysInternalsEula.ps1 -Passthru
EulaAccepted : 1
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software\Sysinternals
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software
PSChildName : Sysinternals
PSDrive : HKCU
PSProvider : Microsoft.PowerShell.Core\Registry
Run the script and then run your Sysinternal tool. The effect is immediate. Enjoy!
Hey, this is great. Never even gave it a second thought but now that I know I can turn it off I notice every time….