von DK2000 » 12.10.2025, 14:27
			
			
			Code: Alles auswählen
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas]
"MUIVerb"=hex(2):4d,00,69,00,74,00,20,00,50,00,6f,00,77,00,65,00,72,00,53,00,\
  68,00,65,00,6c,00,6c,00,61,00,75,00,73,00,66,00,fc,00,68,00,72,00,65,00,6e,\
  00,20,00,28,00,41,00,64,00,6d,00,69,00,6e,00,29,00,00,00
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-file\" \" %1 \""
Das fügt den Eintrag "Mit PowerShell ausführen (Admin) im alten und neuen Kontextmenü hinzu.
Die .reg weiter oben dient nur dazu, eine PowerShell Konsole in einem Verzeichnis mit Adminrechten zu öffnen.
Vom Standardeintrag abweichend, kann man das auch so ändern:
Code: Alles auswählen
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoProfile -NoLogo -NoExit -ExecutionPolicy Bypass -File \" %1 \""
Die Standardeinträge, die Microsoft da anlegt, sind alle irgendwie nicht so prickelnd. Benutze die eigentlich auch nie.
[code]Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas]
"MUIVerb"=hex(2):4d,00,69,00,74,00,20,00,50,00,6f,00,77,00,65,00,72,00,53,00,\
  68,00,65,00,6c,00,6c,00,61,00,75,00,73,00,66,00,fc,00,68,00,72,00,65,00,6e,\
  00,20,00,28,00,41,00,64,00,6d,00,69,00,6e,00,29,00,00,00
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-file\" \" %1 \""[/code]
Das fügt den Eintrag "Mit PowerShell ausführen (Admin) im alten und neuen Kontextmenü hinzu.
Die .reg weiter oben dient nur dazu, eine PowerShell Konsole in einem Verzeichnis mit Adminrechten zu öffnen.
Vom Standardeintrag abweichend, kann man das auch so ändern:
[code][HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\runas\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoProfile -NoLogo -NoExit -ExecutionPolicy Bypass -File \" %1 \""[/code]
Die Standardeinträge, die Microsoft da anlegt, sind alle irgendwie nicht so prickelnd. Benutze die eigentlich auch nie.