Einfacher PowerShell wrapper

@echo off

:: Execute the PS1 file with the same name as this batch file.
set filename=%~d0%~p0%~n0.ps1

if exist "%filename%" (
  PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Unrestricted -Command "& '%filename%'"
 
  :: Collect the exit code from the PowerShell script.
  set err=%errorlevel%
) else (
  echo File not found.
  echo %filename%
 
  :: Set our exit code.
  set err=1
)

:: Pause if we need to.
if [%1] neq [/nopause] pause

:: Exit and pass along our exit code.
exit /B %err%

 

Datei: wrapper.txt

Windows CLI

Windows Programme von der Kommandozeile starten

Device Manager

C:\> devmgmt.msc

Computer Verwaltung

C:\> compmgmt.msc

Ereignisanzeige

C:\> eventvwr.msc

Dienste

C:\> services.msc

Mobilitätscenter

C:\> mblctr.exe

Systemsteuerung

C:\> control.exe

Windows 10 Tricks

  • Autostart Ordner:
<Windows>-r --> shell:startup
  • Explorer:

Kommandozeile / Powershell im aktuellen Ordner öffnen

cmd
powershell

Explorer in aktueller Stelle der Kommandozeile öffnen

C:\> start .

Tastenkürzel

<Windows>-e Explorer öffnen 
<Windows>-i Windows Einstellungen
<Windows>-r Programm ausführen
<Windows>-d Desktop anzeigen
<Windows>-l Desktop sperren