-
-
Save qihuahu/26f9aae48c6f735051a86084ac156c34 to your computer and use it in GitHub Desktop.
Disable Touch Pad with PowerShell Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DeviceName = "HID-compliant touch pad" | |
if(!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList "-File `"$($MyInvocation.MyCommand.Path)`" `"$($MyInvocation.MyCommand.UnboundArguments)`"" | |
Exit | |
} | |
Get-PnpDevice -FriendlyName $DeviceName | Enable-PnpDevice -Confirm:$false | |
Get-PnpDevice -FriendlyName $DeviceName | Disable-PnpDevice -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure to run
Set-ExecutionPolicy Unrestricted
in PowerShell before running the script.