When trying to delete files you get the errorĀ ”The filename or extension is too long.” because someone has created a filename with to many characters.
To delete this quickly:
1. Open a command prompt and cd to the folder that contains the file.
2. Do a “dir /x” to get the Dos 8.3 filename.
3. Now do “del” against this filename displayed.
Below is a small powershell script that will add the “Everyone” Group to Full control for a the registry key HKEY_LOCAL_MACHINE\Software\MyKey. This script will then recursively change the permission on SubKeys and future keys. Save the text to a notepad document and call it something like RegPermissions.ps1
$acl = Get-Acl HKLM:\Software\MyKey
# Everyone has Full contol may do anything:
$person = [System.Security.Principal.NTAccount]"Everyone"
$access = [System.Security.AccessControl.RegistryRights]"FullControl"
$inheritance = [System.Security.AccessControl.InheritanceFlags]"ObjectInherit,ContainerInherit"
$propagation = [System.Security.AccessControl.PropagationFlags]"None"
$type = [System.Security.AccessControl.AccessControlType]"Allow"
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($person,$access,$inheritance,$propagation,$type)
$acl.ResetAccessRule($rule)
Set-Acl HKLM:\Software\MyKey $acl
To run the program from a login script you can assign it to the computer and run using the following syntax:
powershell -executionpolicy bypass -File \\Server\Share\RegPermissions.ps1
| Standard Windows Key combination |
Virtual Machine Connection Key Combination |
Explanation |
| CTRL + ALT + DEL |
CTRL + ALT + END |
Displays the Task Manager or Windows Security dialog box on Windows (or logs in). |
| ALT + TAB |
ALT + PAGE UP |
Switches between programs from left to right. |
| ALT + SHIFT + TAB |
ALT + PAGE DOWN |
Switches between programs from right to left. |
| ALT + ESC |
ALT + INSERT |
Cycles through the programs in the order they were started. |
| CTRL + ESC |
ALT + HOME |
Displays the Windows Start menu. |
| N/A |
CTRL + ALT + PAUSE |
Changes the Virtual Machine Connection window to / from full screen mode. |
| N/A |
CTRL + ALT + LEFT ARROW |
Releases mouse and keyboard focus from the Virtual Machine Connection window. |
You can also send key all windows commands to a Hyper-V by clicking on the server in Hyper-V Manager and choosing Action -> Hyper-V Settings. Under user select “Use on the Virtual Machine”