Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 1, 2026·3 min de lecture

PowerShell — Cross-Platform Automation Shell from Microsoft

PowerShell is a cross-platform task automation solution consisting of a command-line shell, a scripting language, and a configuration management framework that runs on Windows, Linux, and macOS.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
PowerShell Overview
Commande CLI universelle
npx tokrepo install d7a6fb8a-459b-11f1-9bc6-00163e2b0d79

Introduction

PowerShell is an open-source, cross-platform shell and scripting language built on .NET. Originally a Windows-only tool, it now runs natively on Linux and macOS, making it a unified automation platform for managing heterogeneous environments from a single language.

What PowerShell Does

  • Provides a full-featured interactive shell with tab completion, history, and predictive IntelliSense
  • Executes scripts (.ps1) for task automation, CI/CD pipelines, and infrastructure provisioning
  • Manages cloud resources across Azure, AWS, and GCP through dedicated modules
  • Outputs structured objects instead of plain text, enabling pipeline composition without parsing
  • Supports remote management of machines via SSH or WinRM remoting

Architecture Overview

PowerShell runs on top of .NET (Core or Framework). Each command (cmdlet) is a compiled .NET class that emits objects into the pipeline. The pipeline passes typed objects between cmdlets, eliminating the need for text parsing. A module system allows packaging cmdlets, functions, and DSC resources for distribution via the PowerShell Gallery.

Self-Hosting & Configuration

  • Install from the official Microsoft repos, Homebrew, or download binaries from the GitHub releases page
  • User profile lives at $PROFILE; customize prompt, aliases, and module imports there
  • Use Install-Module to add community or first-party modules from the PowerShell Gallery
  • Configure execution policies with Set-ExecutionPolicy to control script trust levels
  • Integrate with VS Code via the PowerShell extension for debugging, linting, and IntelliSense

Key Features

  • Object-oriented pipeline that passes .NET objects, not raw strings
  • Cross-platform: identical scripts run on Windows, Linux, and macOS
  • Built-in remoting for managing fleets of machines over SSH or WinRM
  • Desired State Configuration (DSC) for declarative infrastructure management
  • Extensible module ecosystem with thousands of packages on the PowerShell Gallery

Comparison with Similar Tools

  • Bash — text-based pipeline, ubiquitous on Unix but lacks structured object output
  • Zsh — richer interactive features than Bash, but still string-oriented
  • Python — general-purpose scripting with broader library ecosystem, but not a native shell
  • Nushell — modern structured-data shell inspired by PowerShell, smaller ecosystem
  • Fish — user-friendly shell with autosuggestions, but limited scripting capabilities

FAQ

Q: Does PowerShell replace Bash on Linux? A: It can, but most Linux users run it alongside Bash for tasks that benefit from structured data and .NET integration.

Q: Is PowerShell only for Windows administration? A: No. Since PowerShell 7 it is fully cross-platform and used for cloud automation, CI/CD, and general scripting on any OS.

Q: How do I manage dependencies between modules? A: The PowerShell Gallery and Install-Module handle dependency resolution automatically, similar to package managers like pip or npm.

Q: Can PowerShell call native system commands? A: Yes. Native executables run normally inside PowerShell, and their stdout can be captured as strings or piped into cmdlets.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires