Created
June 6, 2019 07:44
-
-
Save nickGermi/232374c98d401d08ac302c8d34b63042 to your computer and use it in GitHub Desktop.
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
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”)) | |
{ | |
$arguments = “& ‘” + $myinvocation.mycommand.definition + “‘” | |
Start-Process powershell -Verb runAs -ArgumentList $arguments | |
Break | |
} | |
#Set-Location "C:\Program Files (x86)\Windows Kits\10\Tools\x64" | |
#$audioId = (./devcon listclass media).split(":")[1] | |
#$displayId = (./devcon listclass display).split(":")[1] | |
#./devcon restart "@$audioId" | |
#./devcon restart "@$displayId" | |
$audioDevice = Get-PnpDevice -Class Media -FriendlyName 'Intel(R) Display Audio' | Where {$_.InstanceId -Like 'INTELAUDIO\*'} | |
$audioDevice | Disable-PnpDevice -Confirm:$false | |
$audioDevice | Enable-PnpDevice -Confirm:$false | |
$displayDevice = Get-PnpDevice -Class Display | |
$displayDevice | Disable-PnpDevice -Confirm:$false | |
$displayDevice | Enable-PnpDevice -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment