• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 17 pages
Summary

Résumé PowerShell

Document preview thumbnail
Preview 3 out of 17 pages

Toutes les commandes powershell, listées, expliquées, sans trop de blabla

Content preview

PowerShell
Windows PowerShell, anciennement Microsoft Command Shell, est une suite logicielle développée
interface en ligne de commande, un langage de script nommé PowerShell ainsi qu'un kit de dévelo



Console PowerShell
Pour ouvrir en exécutant une cmd :


pwsh -command Get-Date




Sans fermer la console :


pwsh -NoExit -command Get-Date




Pour définir la taille de la fenêtre:


pwsh -WindowStyle Maximized
pwsh -WindowStyle Minimized
pwsh -WindowStyle Hidden




Se positionner dans un repertoire:


pwsh -WorkingDirectory c:\Windows

,Syntaxe des commandes PowerShell
Verbe-Nom -Paramètre valeur
Exemple:




Cmdlet
Les commandes PowerShell se nomment « Cmdlet » et se prononcent Commandelette.


Get-Date ; Get-Item C:\Windows
Pour executer plusieurs commandes à la fois




Cmdlet “ Get-command ”
Pour afficher la liste des commandes


Get command




Pour afficher la liste des commandes qui utilisent un verbe en particulier (get):


Get command -Verb get




Pour afficher la liste des commandes qui utilisent un nom en particulier (alias):


get-command -Noun alias




Pour afficher les informations sur une commande particulière (get-date):


get-command -Name get-date




Pour afficher les commandes qui font appel à un module en particulier (Microsoft.PowerShell.Archiv


Get-Command -Module Microsoft.PowerShell.Archive




Pour afficher le nombre de commandes:

, Cmdlet relatives à l’historique de la session en cours

Get-History #affiche l'historique
Clear-History #efface l'historique




Aide sur PowerShell
Pour mettre à jour le contenu de l’aide:


Update-Help -UICulture fr-fr




Pour afficher l’aide relative à une commande (Get-Service):


get-help Get-Service




Pour afficher l’aide en ligne et enregistrer le contenu:


Save-Help -DestinationPath F:\help\
get-help Get-Service -online




Pour afficher les exemples d’utilisation d’une commande (Get-date):


get-help get-date -Examples




Manipuler des dossiers et fichiers
Lister le contenu d’un repertoire (E:\formation_powershell\):


Get-ChildItem -Path E:\formation_powershell\

Document information

Uploaded on
March 1, 2023
Number of pages
17
Written in
2022/2023
Type
Summary
$7.89

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
13
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions