In this Workshop You will be able to;
- Learn and use the commonly used classes string, int, array, hashtable, pscustomboject, scriptblock, DateTime,TimeSpan, math
- Understand the object oriented approach in Powerhell and expand your programing universe
- Use the lessons learned in real life scenarios like "Reporting expired certificates"
- Import / export data
- Craete advanced functions and manage parameters and risk mitigation options
- Crate your own modules
- Handle errors
- Learn Powershell Remoting
the content is actually a powershell script around 500 lines here in repository. PSWSin500Lines.ps1.
- Why Powershell ?
- PowerShell Versions
- How to Update Powershell?
- What is a command?
- How do I discover commands?
- How to run a command with proper syntax?
- List commands in Modules
- What is an object?
- List properties under the hood
- How to crete a variable
- understand Variable & Object relationship
- use methods
- create strings
- use variables in strings (literal and expandable strings), single vs double quotes
- Run commands within strings using Subexpressions and variable subexpressions
- specify the type of the objects while declaring / creating them
- understand strong or weak type castting methods
- Learn to create and manage hashtable objects
- Learn query hasthables
- Learn use case scenarios of Hashtables in Powershell
- Learn to create your custom object easily using hashtables.
- learn to create arrays
- understand array use cases
- learn to create scalable advanced arrays
- learn to operate arrays
- learn foreach loop and if condition to
- Understand pipeline behaviour
- use pipeline to filter and operate
- send command outputs to other commands
- learn to convert arrays to strings or strings to arrays.
- Learn how to create your own Advanced Functions
- Use parameter attribute to make mandatory parameters
- learn to discover static members
- use commonly used static members exmple with the math class
- Understand use of Providers and learn the drives mapped in Powershell
- start exploring drives other than disk (certificaticates, registry etc)
- learn how to cut properties in pipeline
- add your custom property to an existing object using select object and hashtables
- create a simple script that will report expired certificates
- Importing txt files as objects in Powershell
- Importing CSV files as Objects in Powershell
- Learn how to valdiate parameters
- Use Parametersets to create additional syntaxes
- Risk Mitigation (Confirm, whatif)
- learn how to create a module in Powerhell
- Deploy your module
- Modify the default behaviour of your module
- learn how to hadnle errors
- Stop vs continue behavior in error handling
- use try catch finally block to handle errors
- The importance of the finally block
- Learn basic / legacy remoting options capatabilites
- use Powershell Sessions for advanced Remoting
- Learn Temporary vs Persistent session differences
If your IT lets you or if you already have Vscode and Git for windows we can do the workshop using VSCode instead of Powershell ISE.
-
Download and install following files
-
Initial Git congiruation: Run the followings for inital git setup
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
# below line is only required if you are using a proxy server with no authentication
git config --global http.proxy http://proxy.server.com:port
# If the proxy requires authentation using ntlm authentication
git config --global http.proxy http://:@proxy.server.com:port
git config --global verifySSL false