Description
This training will allow you to master the new Microsoft scripting language (PowerShell 5 but also PowerShell 4) to automate administration tasks under Windows 10, 2016 and 2012 R2. You will implement PowerShell in areas as varied as networking, process management, inventory of a fleet of machines or management of the Active Directory.
Who is this training for ?
For whom ?
Technicians, administrators and systems and network engineers.
Prerequisites
Training objectives
Training program
- Language basics
- The link between PowerShell and .NET.
- Principle, functionality, use of commands and cmdlets.
- Pipelines: behavior of flows and their configuration.
- Code simplification, variable pipeline.
- Where-objects filters, foreach loops.
- Variables, operator types.
- Windows ISE, environment for scripting.
- Types and operators
- The typing system, conversion rules.
- Variables, definition, scope.
- Basic types.
- Expressions regular qualifiers.
- Operators (arithmetic, assignment, logic, string, redirection...).
- Comparators and collections.
- Control structures and functions
- Control structures using cmdlets.
- Conditional structures.
- For loop. While loop. Foreach loop.
- Switch structure (switch).
- Functions, scope modifiers.
- Execution phases of a function.
- Using functions in a pipeline.
- Passing arguments to a script.
- Using cmdlets and modules
- Archive management (compress-archive, expand-archive).
- Web cmdlets (invoke-webrequest, invoke-restmethod).
- Cmdlets to manage your servers and workstations (add-computer, restart-computer).
- Network management cmdlets (new-net*, get-net*, get-bgprouter...).
- Administrative cmdlets (get-event, start-process....).
- File management (get-content, tee-object, import-csv, convertto-html and style sheets).
- Using CIM objects
- The CIM (Common Information Model) data model. CIM and WMI.
- New cmdlet to manage the WMi (get-cimstance, new-cimsession...).
- Difference between get-wmiobject and get-ciminstance.
- Listing of WMI classes, complete help.
- Using WMI methods and properties (shares of a workstation , test for the presence of machines on the network...).
- Using .NET and COM
- Using object libraries to manipulate system components.
- Using .NET classes (ping, udp, credential...).
- System classes.
- PowerShell and the graphical interface: XAML presentation.
- Managing PowerShell modules, packages
- How a module works. List the modules.
- The DHCP, DNS, hyper-V module.
- The Active Directory module.
- Commands: find, install modules (find-module, install-module...).
- Package management.
- Com objects
- List available com objects.
- New performance of com objects.
- Creation, modification of an Excel workbook.
- Open a PowerPoint, Word file.
- The best PowerShell cmdlets and tips
- commands: get-random, get-process, get-service.
- Transform text into object (ConvertFrom-String).
- The Psedit command.
- Creating symbolic links (new-item).
- The basic commands get-filehash, get-disk, get-hotfix.
- The commands and variables: new-guid, new-smbshare, new-timespan.