Keep in mind that the below commands can also be wrapped into an 'Invoke-Command' - You just need to make sure WinRM* is enabled on the remote computer -
I'll list out below, how I deal with WinRM enablement.*
Get each of these values:
NOTE - Two different Registry locations; 'HKEY_USERS\.DEFAULT', and 'HKEY_CURRENT_USER'
(Get-ItemProperty -Path Registry::"HKEY_USERS\.DEFAULT\Control
Panel\Keyboard" -Name InitialKeyboardIndicators).InitialKeyboardIndicators
(Get-ItemProperty -Path Registry::"HKEY_CURRENT_USER\Control
Panel\Keyboard" -Name InitialKeyboardIndicators).InitialKeyboardIndicators |
Set-ItemProperty -Path Registry::"HKEY_USERS\.DEFAULT\Control
Panel\Keyboard" -Name InitialKeyboardIndicators -Value 2 Set-ItemProperty -Path Registry::"HKEY_USERS\.DEFAULT\Control Panel\Keyboard" -Name InitialKeyboardIndicators -Value 2147483650 Set-ItemProperty -Path Registry::"HKEY_CURRENT_USER\Control
Panel\Keyboard" -Name InitialKeyboardIndicators -Value 2 Set-ItemProperty -Path Registry::"HKEY_CURRENT_USER\Control
Panel\Keyboard" -Name InitialKeyboardIndicators -Value 2147483650 |
Hint: Your gonna need PsExec from the SysInternals suite...
(Also, forgive the aliases I used here and there...)
$Computer_Name = "ComputerName" # WinRM test If ($TestCommand){
Write-Host " WinRM
enabled." -Fore Yellow -Back 2
} |
No comments:
Post a Comment