Présentation de la formation Powershell 2.0 alphorm.com™© Site : http://www.alp
Présentation de la formation Powershell 2.0 alphorm.com™© Site : http://www.alphorm.com Blog : http://www.ConfigMgrdistrict.com Blog : http://www.Powershelldistrict.com Forum : http://www.alphorm.com/forum formation Stéphane van Gulick Consultant systèmes et automatisation Certifications : MCT, MCITP , MCSA Contact : svangulick@alphorm.com Twitter : @Stephanevg Introduction Powershell 2.0 alphorm.com™© Plan • Présentation du formateur. • Prérequis de cette formation. • Quelques références. • Présentation de la formation. Powershell 2.0 alphorm.com™© Présentation du formateur • Présentation • Stéphane van Gulick Ingénieur Systèmes et automatisation MCTS, MCITP EA, MCSA Blog : http://PowerShellDistrict.com Powershell 2.0 alphorm.com™© Blog : http://PowerShellDistrict.com Twitter : @stephanevg Prérequis de cette formation Connaissances des systèmes Windows Une expérience en Scripting est un plus. (Mais pas obligatoire !) Compréhension de principes algorithmiques (tel que les « IF, ELSE, FOREACH) etc.. Être motivé et enthousiaste ! Powershell 2.0 alphorm.com™© Être motivé et enthousiaste ! Lab: • 1 machine Windows 7 • (une deuxième machine windows 7 pour le chapitre sur le remoting). Quelques références • Version CHM de l’aide PowerShell http://www.microsoft.com/en- us/download/details.aspx?id=10552 • Script center http://technet.microsoft.com/en-us/scriptcenter/ • Blog Scripting Guy http://blogs.technet.com/b/heyscriptingguy/ • Livres -> Powershell 2.0 alphorm.com™© • Livres -> Windows PowerShell Guide de référence PowerShell in Action Présentation de la formation 3 grandes parties Chapitres Powershell 2.0 alphorm.com™© Chapitres Modules Présentation de la formation 1. L’initiation au PowerShell 2.0 Chapitre 1 : Introduction à PowerShell 1. Présentation de la formation 2. Introduction générale a Windows PowerShell Chapitre 2 : L’apprentissage de PowerShell Powershell 2.0 alphorm.com™© Chapitre 2 : L’apprentissage de PowerShell 1. Introduction au langage 2. Opérateurs et expressions 3. La gestion du flux (l’utilisation du pipe) 4. Importer des données depuis des supports externes. Présentation de la formation • Partie 2 : L’utilisation avancé de PowerShell 2.0 Chapitre 3 L’utilisation avancé de PowerShell : Le scripting 1. Les fonctions et les filtres 2. La gestion d’erreur 3. Les fonctions avancées Powershell 2.0 alphorm.com™© 3. Les fonctions avancées Chapitre 4 : La maitrise de PowerShell en travaillant à grande échelle 1. Les modules 2. L’execution à distance 3. L’execution en tâche de fond : “Les jobs” Présentation de la formation Partie 3 : Maîtrise de PowerShell 2.0 Chapitre 5: Créer ses propres cmdlets • Le WMI • L’automatisation d’applications (Com objects) • L’exploitation du dotnet Powershell 2.0 alphorm.com™© • L’exploitation du dotnet Conclusion Are you ready ? ☺ Let’s GO ! Powershell 2.0 alphorm.com™© Let’s GO ! Introduction générale à Introduction à Windows PowerShell Initiation à PowerShell Powershell 2.0 alphorm.com™© Introduction générale à Windows PowerShell Stéphane van Gulick Consultant systèmes et automatisation Certifications : MCT, MCITP , MCSA Contact : svangulick@alphorm.com Twitter : @Stephanevg Site : http://www.alphorm.com Blog : http://www.ConfigMgrdistrict.com Blog : http://www.Powershelldistrict.com Forum : http://www.alphorm.com/forum Plan 1. Qu’est-ce PowerShell ? 2. Les différents versions existantes de PowerShell. 3. Prérequis nécessaire pour l’installation / l’utilisation de PowerShell. 4. Présentation du prompt, et de l’environnement de Scripting intégré. Powershell 2.0 alphorm.com™© 5. Découverte des premières commandes. Les avantages à utiliser Windows PowerShell ? Automatisation de tâches récurrentes / répétitives. Réduit le temps d’effort nécessaire pour l’accomplissement de cette tâche. Permet de paralléliser plusieurs tâches à la fois. Réduit la probabilité d’erreur. Possibilité de déléguer une tâche plus facilement. Powershell 2.0 alphorm.com™© Possibilité de déléguer une tâche plus facilement. Est idéal pour la réutilisabilité. Permet d’aller au-delà des limites des interface graphiques. Présence de Windows PowerShell Système d’éxploitation PowerShell 2.0 Windows XP PowerShell 2.0 (Facultatif) Windows Server 2003 PowerShell 2.0 (Facultatif) Windows Vista PowerShell 2.0 (Facultatif) Windows 7 PowerShell 2.0 (Natif) Powershell 2.0 alphorm.com™© Windows Server 2008 PowerShell 2.0 (Natif) Windows 8 PowerShell 3.0 (Natif) Windows Server 2012 PowerShell 3.0 (Natif) Windows 8.1 PowerShell 4.0 (Natif) Windows Server 2012 R2 PowerShell 4.0 (Natif) Prérequis à l’installation de Windows PowerShell Powershell Windows Management framework Prérequis Lien 2.0 WMF 2.0 Dotnet 2.0 http://support.microsoft.com/k b/968929/fr Powershell 2.0 alphorm.com™© b/968929/fr 3.0 WMF 3.0 Dotnet 3.5 http://support.microsoft.com/k b/2506143/fr 4.0 WMF 4.0 Dotnet 4.5 http://www.microsoft.com/fr- fr/download/details.aspx?id=4 0855 Découverte de la console PowerShell + ISE Prompt PowerShell Console ISE Powershell 2.0 alphorm.com™© Prompt – Récapitulatif Commande Résultat F1 Réécris la dernière commande lettre par lettre. F3 Auto complète une commande. F4 Supprime jusqu’au curseur. F5 Remonte dans l’historique des commandes. F7 Affiche l’historique des commandes. (CTRL+F7 l’efface) Commande Résultat Alt+ espace +E Navigue vers menu édition. CTRL+C Cesse l’exécution de la commande en cours. CTRL+S Pause l’affichage en cours. CTRL + end Supprime tout depuis le curseur. Powershell 2.0 alphorm.com™© commandes. (CTRL+F7 l’efface) F8 Auto complète votre ligne avec votre historique. F9 Spécifie une ligne de l’historique précise (F7) Tab / Shift + tab Auto complète votre commande. Flèche haut / bas Navigue dans l’historique des commandes. (F7) échappe Efface la ligne entière. CTRL + Fleche gauche / droite Navigue sur la ligne du prompt mot par mot. ISE – Récapitulatif Commande Résultat CTRL+O Ouvre un script. CTRL+N Nouveau script. CTRL+S Sauvegarde le script. CTRL+T Nouvel onglet. Powershell 2.0 alphorm.com™© CTRL+W Nouvel onglet réseau. F5 Exécution du code en cours. F8 Exécution d’une sélection du code. Ce qu’on a couvert 1. Qu’est-ce PowerShell ? 2. Les différents versions existantes de PowerShell. 3. Prérequis pour nécessaire pour l’installation de PowerShell. 4. Présentation du prompt, et de l’environnement de Scripting intégré. Powershell 2.0 alphorm.com™© 5. Navigation et raccourcis clavier. 6. Découverte des premières commandes de base. Introduction au langage Apprentissage de PowerShell Initiation à Windows PowerShell Powershell 2.0 alphorm.com™© Introduction au langage Stéphane van Gulick Consultant systèmes et automatisation Certifications : MCT, MCITP , MCSA Contact : svangulick@alphorm.com Twitter : @Stephanevg Site : http://www.alphorm.com Blog : http://www.ConfigMgrdistrict.com Blog : http://www.Powershelldistrict.com Forum : http://www.alphorm.com/forum Plan • Vous connaissez déjà le PowerShell ! • Présentation de la structure et découverte premières commandes • Comment trouver de l’aide ? • Les variables Powershell 2.0 alphorm.com™© Le PowerShell vous connaissez déjà ! Les aliases Dir del Pusd Powershell 2.0 alphorm.com™© Pusd Pwd Cls Structure des commandes Verbe-nom Get-help Get-Command Set-wmiObject Move- Powershell 2.0 alphorm.com™© Move- Adcomputer Read-host Comment trouver de l’aide ? • Get-help <nom de la commande> • Get-command • Get-member (gm) • Internet : PowerShell + commande (ou action a réaliser) Powershell 2.0 alphorm.com™© Les variables : Récapitulatif Nom Type Exemple String [string] Texte Bonjour Array [array]Tableau Bonjour, Bonsoir, salut Integer [int]Entier 1, 400, 1000, 14 Double [double]Doubl 14.456, 1.5, 78,4 etc… Cmdlets Get-variable assignation $=<contenue> $=<commande> $=<Opération> Powershell 2.0 alphorm.com™© Double [double]Doubl e 14.456, 1.5, 78,4 etc… Date [date]Une date 11/10/2013, etc… Hashtable @{} Jean;25 Michel;23 Hamid;30 Get-variable Set-variable Clear-variable Remove-variable New-variable Ce qu’on a couvert • Présentation de la structure et découverte des premières commandes • Comment trouver de l’aide. • Les variables. Powershell 2.0 alphorm.com™© Opérateurs et Apprentissage de PowerShell Initiation à Windows PowerShell Powershell 2.0 alphorm.com™© Opérateurs et expressions Stéphane van Gulick Consultant systèmes et automatisation Certifications : MCT, MCITP , MCSA Contact : svangulick@alphorm.com Twitter : @Stephanevg Site : http://www.alphorm.com Blog : http://www.ConfigMgrdistrict.com Blog : http://www.Powershelldistrict.com Forum : http://www.alphorm.com/forum Plan • Opérateurs arithmétiques • Opérateurs d’assignation • Opérateurs de comparaison • Opérateurs de traitement de texte Powershell 2.0 alphorm.com™© • Opérateurs logiques Opérateurs Arythmétiques Operateur Signification + Addition - Soustraction / Division Powershell 2.0 alphorm.com™© * multiplication % Modulo Opérateurs de d’assignation Operateur Signification = Assigniation. += Assignation an gardant la valeur precedente. -= Sous trait en Powershell 2.0 alphorm.com™© -= Sous trait en reasignant le resultat. /= Divise en reasignant le resultat. %= Divise et assigne le modulo à la variable. Opérateurs de comparaison Operateur Signification Variante sensible à la casse Variante insensible à la casse -eq Equal -ceq -ieq -ne Not equal -cne -ine Powershell 2.0 alphorm.com™© -gt Greather then -cgt -igt -ge Greather or equal -cge -ige -lt Less then -clt -ilt -le Less or equal -cle -ile Les opérateurs de traitement de text Operateur Significati on Variante sensible à la casse Variante insensible à la casse -like comme -clike -ilike -notlike Pas comme -cnotlike -inotlike -match Correspond -cmatch -imatch Operateur Signification -replace remplace -join concatène -split Sépare Powershell 2.0 alphorm.com™© -notmatch Correspond pas -cnotmatch -inotmatch -split Sépare Operateur Signification -contains Contient -Notcontains Ne contient pas Les opérateurs logiques Operateur Signification Variante Bits -and et -band -or ou -bor Powershell 2.0 alphorm.com™© -not non -bnot -xor Ou exclusif -bxor Ce qu’on a couvert • Opérateurs arithmétiques • Opérateurs d’assignation • Opérateurs de comparaison • Opérateurs de traitement de texte Powershell 2.0 alphorm.com™© • Opérateurs logiques • Lien: http://www.cheatography.com/davechild/cheat- sheets/regular-expressions/ Les providers Apprentissage de PowerShell Initiation à Windows PowerShell Powershell 2.0 alphorm.com™© Les providers Stéphane van Gulick Consultant systèmes et automatisation Certifications : MCT, MCITP , MCSA Contact : svangulick@alphorm.com Twitter : @Stephanevg Site : http://www.alphorm.com Blog : http://www.ConfigMgrdistrict.com Blog : http://www.Powershelldistrict.com Forum : http://www.alphorm.com/forum Plan • Que sont les providers ? • Pourquoi utiliser les providers ? • Démonstration Powershell 2.0 alphorm.com™© Les providers • Que sont les providers ? C’est un adaptateur PowerShell. Cela permet d’utiliser certaines parties du system de la même manière que l’utilisation du FileSystem sous dos par exemple. • Pourquoi uploads/Industriel/ support-de-la-formation-powershell-2-0-ss.pdf
Documents similaires










-
40
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Mar 02, 2022
- Catégorie Industry / Industr...
- Langue French
- Taille du fichier 2.2645MB