Files
2026-04-23 13:00:05 +02:00

55 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PowerShell Skripte
Die Skripte in diesem Verzeichnis **erfordern PowerShell 7**.
Das klassische Windows PowerShell 5.1 wird zum teil **nicht unterstützt**.
---
## PowerShell 7 installieren
### Option 1: Microsoft Store (empfohlen)
1. Microsoft Store öffnen
2. Nach **„PowerShell"** suchen
3. App von Microsoft installieren
### Option 2: Winget (Terminal / Kommandozeile)
```powershell
winget install Microsoft.PowerShell
```
### Option 3: Manueller Download
Installer direkt von GitHub herunterladen:
https://github.com/PowerShell/PowerShell/releases/latest
---
## Skripte ausführen
> **Hinweis:** Die `.ps1`-Dateien lassen sich **nicht per Doppelklick starten**
> das ist ein bekanntes Windows-Verhalten und kein Fehler.
### So geht's richtig:
**1. PowerShell 7 öffnen**
Startmenü → nach **„pwsh"** oder **„PowerShell 7"** suchen → öffnen
**2. In den richtigen Ordner wechseln**
```powershell
cd "C:\Pfad\zum\Skript-Ordner"
```
**3. Skript ausführen**
```powershell
.\MeinSkript.ps1
```
---
## Prüfen ob PowerShell 7 aktiv ist
In der geöffneten Konsole eingeben:
```powershell
$PSVersionTable.PSVersion
```
Die **Major**-Version muss `7` oder höher sein. Steht dort `5`, ist noch das alte Windows PowerShell aktiv.