Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Scripting mit Windows PowerShell

Ähnliche Präsentationen


Präsentation zum Thema: "Scripting mit Windows PowerShell"—  Präsentation transkript:

1 Scripting mit Windows PowerShell
Frank Koch Infrastructure Architect Microsoft Schweiz / Deutschland Scripting mit Windows PowerShell INF210

2 Sie möchten mehr erfahren?
anfragen können dauern! Links zum Blog etc.

3 Kostenlose PowerShell Bücher im Blog

4 Windows PowerShell Leicht zu verwenden, erlaubt kurze Skripte
Unterstützt alte CMD oder WSH Skripte Hohe Automatisierung inkl. .NET, WMI & COM

5 Sicherheit ist sehr wichtig
Standardmässig werden keine Skripte ausgeführt, nur interaktive Nutzung! Ändern Sie die ExecutionPolicy, z.B. über Gruppenrichtlinien Klick auf PS1 Skript öffnet nur Notepad Policy Effects Restricted No scripts AllSigned All scripts must be signed RemoteSigned Local scripts, remote signed Unrestricted Nothing signed

6 Windows PowerShell Grundlagen
3/28/2017 8:11 PM Windows PowerShell Grundlagen Neue Shell für Windows für Skripte & interaktive Nutzung Basiert auf .NET aber man muss nicht .NET kennen oder C# lernen Viele eingebaute Tools & Befehle (+120) Alte Tools funktionieren weiterhin und können kombiniert werden (md, ipconfig, wmic…) Vollkommen Objektorientiert statt Texte analysieren (ipconfig & IPv6!) Grundlage für neues Managementframework MICROSOFT CONFIDENTIAL © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 MMC 3.0 über Windows PowerShell
3/28/2017 3/28/2017 8:11 PM MMC 3.0 über Windows PowerShell Windows Forms GUI Microsoft Management Console 3.0 PSObject Early Bound Objects Layered Over Command Line Windows PowerShell Cmdlets Windows PowerShell Engine To Manage Your Application Custom Application 7 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Beispiel Exchange 2007 GUI Setup CLI WinForms WinForms ADO.Net
3/28/2017 8:11 PM Beispiel Exchange 2007 GUI Setup CLI WinForms WinForms ADO.Net Early-bound objs PowerShell Data Provider PowerShell Engine Exchange cmdlets Configuration Data Access Process boundary MAPI Store AD Meta base Registry © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Folgende Produkte benutzen PowerShell
Exchange Server 2007 SC Virtual Machine Manager SC Data Protection Manager SC Operations Manager SC Configuration Manager Client Tools Windows Computer Cluster 2008 Windows Server 2008 Add-on für Windows Server 2003, XP, Vista Common Engineering Criteria 2009

10 3/28/2017 8:11 PM Grundlagen © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 Sprachgrundlagen von PowerShell
Syntax: verb-noun –parameter arguments Immer Einzahl, Parameters starten mit “-” Get-help, get-help * Get-help get-process Wichtige Befehle für den Anfang: Get-help, get-command Get-member Measure-object | = AltGr 7 und nicht AltGr 1 (=¦) -detailed

12 Für den Anfang: Bekanntes existiert weiter
PowerShell kennt Unix & CMD Befehle Dir = LS = get-childitem Ps = get-process “Alte” Befehle als alias abgelegt Erweiterbar nach eigenen Wünschen Vergessen Sie nicht was Sie wissen! Erweitern Sie die Befehle nur für die direkte Eingabe, nicht für Ihre Skripte! Sonst können Sie die Skripte nicht weitergeben 

13 Viele Partner erweitern die PowerShell
Active Directory Management mit Quest Für Benutzer, Gruppen… Kostenlos & regelmässig erweitert Gruppenrichtlinien mit SDM Software Anlegen, Löschen & Zuweisen von GPOs Anpassen von GPOs (kostenpflichtig) Navigieren durch das AD wie durch ein Dateisystem mit PSCX Viele weitere hilfreiche befehle (zip, Ping…)

14 Es exitieren auch sinnvolle Zusatztools
PowerGadgets als grafische Ausgabetool Interaktive Bedienung oder reines Reporting PowerShell Plus Editor mit Intellisense und Debugger Peedy Dazu später mehr 

15 Übersicht, Hilfe & Befehle
3/28/2017 8:11 PM Einstieg Übersicht, Hilfe & Befehle © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 Objekte 1 Variablen & Umgebung 3/28/2017 8:11 PM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Sortieren & Selektieren
3/28/2017 8:11 PM Einfaches Sortieren & Selektieren © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18 Objekte 2 WMI, .NET und COM 3/28/2017 8:11 PM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 Praxis: AD User & mehr 3/28/2017 8:11 PM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20 Ausgabe CSV, XML, TXT, PDF… 3/28/2017 8:11 PM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 Buntes Powergadgets & mehr 3/28/2017 8:11 PM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 Wie geht es weiter mit der PowerShell?
Version 1 ist Bestandteil der Plattform Ab Windows 2008 direkt dabei Viele Produkte benutzen Windows PowerShell Version 2 ist in früher Beta-Phase Remoting ist „wichtigste“ Neuerung Beta verlangt noch Uninstall von V1 RTM wird Upgrade erlauben Noch viele Änderungen möglich! !! Geben Sie Feedback !!

23 Wichtige Ressourcen Kostenlose Windows PowerShell Bücher & Workshops & Webcasts auf unserem Blog Sehr gute Bücher bei MS Press und anderen Verlagen, z.B. von Bruce Payette Vergessen Sie nicht die Dokumentation!

24 3/28/2017 8:11 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Herunterladen ppt "Scripting mit Windows PowerShell"

Ähnliche Präsentationen


Google-Anzeigen