Quelle: PowerShell equivalents for common Linux/bash commands – TheShellNut
iTunes – Zwischen Mediatheken wechseln
Beim Start von iTunes kann man durch Halten der „Shift-Taste“ (Windows) oder der „Alt-Taste“ (Mac) eine Mediathek auswählen. Somit können auch mehrere Mediatheken (an unterschiedlichen Speicherorten) parallel genutzt werden.
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
SAN Zoning auf Brocade Switches
Nützliche CLI Kommandos auf dem Brocade Switches:
Konfiguration anzeigen:
switch:admin> cfgshow * switch:admin> zoneshow * switch:admin> alishow *
Statt dem * können auch Reguläre Ausdrücke verwendet werden. Ohne * wird immer alles angezeigt. Weiterlesen
Hyper-V Snapshot über Power-Shell löschen
Get-VMSnapshot -VMName 'VM' -ComputerName 'HOST' | Remove-VMSnapshot
Get-VMSnapshot -VMName 'VM' -ComputerName 'HOST' -SnapshotType Recovery | Remove-VMSnapshot
Windows 10 Apps De-Installieren
Die folgenden Apps werden deinstalliert:
Get-AppxPackage *3dbuilder* | Remove-AppxPackage Get-AppxPackage *bingfinance* | Remove-AppxPackage Get-AppxPackage *bingnews* | Remove-AppxPackage Get-AppxPackage *bingsports* | Remove-AppxPackage Get-AppxPackage *candycrushsaga* | Remove-AppxPackage Get-AppxPackage *connectivitystore* | Remove-AppxPackage Get-AppxPackage *messaging* | Remove-AppxPackage Get-AppxPackage *skypeapp* | Remove-AppxPackage Get-AppxPackage *solitaire* | Remove-AppxPackage Get-AppxPackage *twitter* | Remove-AppxPackage Get-AppxPackage *windowsphone* | Remove-AppxPackage Get-AppxPackage *xbox* | Remove-AppxPackage Get-AppxPackage *zunemusic* | Remove-AppxPackage Get-AppxPackage *zunevideo* | Remove-AppxPackage
Eine Liste aller Apps erhalten Sie über den folgenden PowerShell-Befehl:
Get-AppxPackage | Select Name, PackageFullName
Die Apps lassen sich wie folgt wieder installieren:
Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}