Skip to content

Instantly share code, notes, and snippets.

@schlarpc
Created January 8, 2021 20:58
Show Gist options
  • Save schlarpc/3d283b50f74abc1a0a872b2933f91f3f to your computer and use it in GitHub Desktop.
Save schlarpc/3d283b50f74abc1a0a872b2933f91f3f to your computer and use it in GitHub Desktop.
Enable ShadowPlay on computer unlock (RDP fix)
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2021-01-08T12:52:30.0596384</Date>
<Author>MUFFIN\User</Author>
<URI>\Enable ShadowPlay</URI>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
<UserId>MUFFIN\User</UserId>
</LogonTrigger>
<SessionStateChangeTrigger>
<Enabled>true</Enabled>
<StateChange>SessionUnlock</StateChange>
<UserId>MUFFIN\User</UserId>
</SessionStateChangeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-3489019662-3517907065-2876835971-1001</UserId>
<LogonType>Password</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>true</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>PowerShell.exe</Command>
<Arguments>-ExecutionPolicy Bypass -File "C:\Users\User\Documents\enable-shadowplay.ps1"</Arguments>
</Exec>
</Actions>
</Task>
Set-ItemProperty -Path "HKCU:\Software\NVIDIA Corporation\Global\ShadowPlay\NVSPCAPS" -Name "{1B1D3DAA-601D-49E5-8508-81736CA28C6D}" -Value ([byte[]](0x01,0x00,0x00,0x00))
Restart-Service -Name NvContainerLocalSystem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment