SlideShare a Scribd company logo
Reach the next level with
PowerShell
Jaap Brasser
@jaap_brasser
@Jaap_Brasser
jaapbrasser.com/about
• PowerShell Conf EU/Asia
• Dutch PowerShell User Group
• Blogging
• GitHub
• PowerShell Gallery
• TechNet Forums/Gallery
Agenda
PowerShell versions
• How to check your PowerShell version:
OS PowerShell version
Windows 7, Server2008R2 2.0
Windows 8, Server2012 3.0
Windows 8.1, Server 2012R2 4.0
Windows 10, Server 2016 5.0
Windows 10 Creators Update 5.1
$PSVersionTable
PowerShell language
Agenda
What are we building?
Requirements
1. Structured output – Objects!
2. Hostname of the system
3. Domain name of system
4. OS info
5. Memory info
6. System disk
7. Pagefile
8. IP info
9. Create a function
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 1
Retrieve hostname
Demo
Summary
• Found the host name of the system
• Looked at PowerShell drives
• Explored the Env: drive
• Found the hostname of the system
• Created a PowerShell object
• Exported the object to csv
• Opened csv in Excel
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 2
Get System Domain
Demo
Summary
• Found the user domain
• Found the system domain
• Merged output with previous output
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 3
OS Information
Demo
Summary
• Used the Win32_OperatingSystem class
• Retrieved the information
• Established Get-WmiObject is obsolete
• Used Get-CimInstance
• Help examples with array indexing
• Used WQL to speed up query
• Get-CimInstance hiding output
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 4
Memory information
Demo
Summary
• Retrieved information from ComputerSystem
• Divided by GB
• Strong typed as integer to remove rounding
• Used format operator to create string
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 5
Timezones
Demo
Summary
• Used the Get-TimeZone cmdlet
• Found out that the timezone description does
not take DST into account
• Used [datetime] type accelerator
• UtcNow
• Now
• Calculated actual time difference
• Combined output into a single string
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 6
System disk size
Demo
Summary
• Find out which disk is the system disk
• Find out how big the disk is
• Create the correct WQL query
• Format output into a string
• Set number of decimals for size in GB with
[math]::round
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 7
Pagefile from registry
Demo
Summary
• Found the registry provider PSDrive
• Looked at the ‘Memory Management’ key
• Retrieved the information using Get-
ItemProperty
• Used the –join operator to collapse the array
Agenda
• Differences between editors
• Configure VSCode
• Working with Vscode
• Setting up the ISE
• Working with the ISE and ISESteroids
• Questions
Demo 8
Create the function
Demo
Summary
• Create the Get-ComputerInformation function
• Create a hashtable
• Fill the values in the hashtable using output
from the commands created
• Convert the hashtable to a PowerShell custom
object
• Ran the function
Questions ? Github.com/jaapbrasser/Events/
Jaapbrasser.com

More Related Content

What's hot

From zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the guiFrom zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the gui
Jaap Brasser
 
Automating security with PowerShell
Automating security with PowerShellAutomating security with PowerShell
Automating security with PowerShell
Jaap Brasser
 
Writing power shell the right tool for the job
Writing power shell   the right tool for the jobWriting power shell   the right tool for the job
Writing power shell the right tool for the job
Jaap Brasser
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEA
Jaap Brasser
 
Breakdown the GUI - PowerShell logging to automate everything
Breakdown the GUI - PowerShell logging to automate everythingBreakdown the GUI - PowerShell logging to automate everything
Breakdown the GUI - PowerShell logging to automate everything
Jaap Brasser
 
Building your own JEA Configuration
Building your own JEA ConfigurationBuilding your own JEA Configuration
Building your own JEA Configuration
Jaap Brasser
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
Refresh Annapolis Valley
 
Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]
ahmadezzeir
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
NCCOMMS
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSC
Josh Gillespie
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint Admins
Rick Taylor
 
Power shell v3 session1
Power shell v3   session1Power shell v3   session1
Power shell v3 session1
Vladimir Márquez
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
Ravikanth Chaganti
 
RavenDB 3.5
RavenDB 3.5RavenDB 3.5
RavenDB 3.5
Oren Eini
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
Ravikanth Chaganti
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
Sascha Möllering
 
Zend Framwork configurations
Zend Framwork configurationsZend Framwork configurations
Zend Framwork configurations
Uva Wellassa University
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
Bruno Abrantes
 
Command box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLCommand box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPL
ColdFusionConference
 

What's hot (20)

From zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the guiFrom zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the gui
 
Automating security with PowerShell
Automating security with PowerShellAutomating security with PowerShell
Automating security with PowerShell
 
Writing power shell the right tool for the job
Writing power shell   the right tool for the jobWriting power shell   the right tool for the job
Writing power shell the right tool for the job
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEA
 
Breakdown the GUI - PowerShell logging to automate everything
Breakdown the GUI - PowerShell logging to automate everythingBreakdown the GUI - PowerShell logging to automate everything
Breakdown the GUI - PowerShell logging to automate everything
 
Building your own JEA Configuration
Building your own JEA ConfigurationBuilding your own JEA Configuration
Building your own JEA Configuration
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSC
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint Admins
 
Power shell v3 session1
Power shell v3   session1Power shell v3   session1
Power shell v3 session1
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
 
RavenDB 3.5
RavenDB 3.5RavenDB 3.5
RavenDB 3.5
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Zend Framwork configurations
Zend Framwork configurationsZend Framwork configurations
Zend Framwork configurations
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Command box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLCommand box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPL
 

Similar to Reach the next level with PowerShell

SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
Sencha
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
Jason Gerard
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
Fernando Tomlinson, CISSP, MBA
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
Speedment, Inc.
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
Malin Weiss
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
Paul Withers
 
Ow
OwOw
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
Paul Withers
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
Oliver Busse
 
.NET7.pptx
.NET7.pptx.NET7.pptx
Introducing Widows 7
Introducing Widows 7Introducing Widows 7
Introducing Widows 7
Gene Carboni
 
Testing microservices with docker
Testing microservices with dockerTesting microservices with docker
Testing microservices with docker
Denis Brusnin
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
Speedment, Inc.
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
Malin Weiss
 
Silicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSilicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your database
Speedment, Inc.
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your database
Speedment, Inc.
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
Uriel Barrales Garrido
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 

Similar to Reach the next level with PowerShell (20)

SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
 
Ow
OwOw
Ow
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
.NET7.pptx
.NET7.pptx.NET7.pptx
.NET7.pptx
 
Introducing Widows 7
Introducing Widows 7Introducing Widows 7
Introducing Widows 7
 
Testing microservices with docker
Testing microservices with dockerTesting microservices with docker
Testing microservices with docker
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
Silicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSilicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your database
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your database
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 

More from Jaap Brasser

Level up your SQL and Azure, by using Rubrik
Level up your SQL and Azure, by using RubrikLevel up your SQL and Azure, by using Rubrik
Level up your SQL and Azure, by using Rubrik
Jaap Brasser
 
Your first PowerShell script: Open the door to automation
Your first PowerShell script: Open the door to automationYour first PowerShell script: Open the door to automation
Your first PowerShell script: Open the door to automation
Jaap Brasser
 
Write Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure FunctionsWrite Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure Functions
Jaap Brasser
 
From PowerShell Function to Serverless code with Azure Functions
From PowerShell Function to Serverless code with Azure FunctionsFrom PowerShell Function to Serverless code with Azure Functions
From PowerShell Function to Serverless code with Azure Functions
Jaap Brasser
 
Discover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation SuiteDiscover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation Suite
Jaap Brasser
 
Bridge the gap with Chat Automation
Bridge the gap with Chat AutomationBridge the gap with Chat Automation
Bridge the gap with Chat Automation
Jaap Brasser
 
Automate Anything with Microsoft Flow
Automate Anything with Microsoft FlowAutomate Anything with Microsoft Flow
Automate Anything with Microsoft Flow
Jaap Brasser
 
Automate everything with PowerShell
Automate everything with PowerShellAutomate everything with PowerShell
Automate everything with PowerShell
Jaap Brasser
 
Automate yourself out of a job - Use ChatOps!
Automate yourself out of a job - Use ChatOps!Automate yourself out of a job - Use ChatOps!
Automate yourself out of a job - Use ChatOps!
Jaap Brasser
 
Create awesome Azure Functions with PowerShell
Create awesome Azure Functions with PowerShellCreate awesome Azure Functions with PowerShell
Create awesome Azure Functions with PowerShell
Jaap Brasser
 
Microsoft Flow and PowerShell combined to automate everything
Microsoft Flow and PowerShell combined to automate everythingMicrosoft Flow and PowerShell combined to automate everything
Microsoft Flow and PowerShell combined to automate everything
Jaap Brasser
 
Workshop automating with microsoft flow
Workshop   automating with microsoft flowWorkshop   automating with microsoft flow
Workshop automating with microsoft flow
Jaap Brasser
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure Functions
Jaap Brasser
 
Using Microsoft Flow for IT Professionals
Using Microsoft Flow for IT ProfessionalsUsing Microsoft Flow for IT Professionals
Using Microsoft Flow for IT Professionals
Jaap Brasser
 
Automating everything with Microsoft Flow
Automating everything with Microsoft FlowAutomating everything with Microsoft Flow
Automating everything with Microsoft Flow
Jaap Brasser
 
Go with the flow!
Go with the flow!Go with the flow!
Go with the flow!
Jaap Brasser
 
Navigate around the edge with PowerShell
Navigate around the edge with PowerShellNavigate around the edge with PowerShell
Navigate around the edge with PowerShell
Jaap Brasser
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOpsUsing Chat Automation - ChatOps
Using Chat Automation - ChatOps
Jaap Brasser
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure Functions
Jaap Brasser
 
Bringing Dev and Ops together with ChatOps
Bringing Dev and Ops together with ChatOpsBringing Dev and Ops together with ChatOps
Bringing Dev and Ops together with ChatOps
Jaap Brasser
 

More from Jaap Brasser (20)

Level up your SQL and Azure, by using Rubrik
Level up your SQL and Azure, by using RubrikLevel up your SQL and Azure, by using Rubrik
Level up your SQL and Azure, by using Rubrik
 
Your first PowerShell script: Open the door to automation
Your first PowerShell script: Open the door to automationYour first PowerShell script: Open the door to automation
Your first PowerShell script: Open the door to automation
 
Write Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure FunctionsWrite Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure Functions
 
From PowerShell Function to Serverless code with Azure Functions
From PowerShell Function to Serverless code with Azure FunctionsFrom PowerShell Function to Serverless code with Azure Functions
From PowerShell Function to Serverless code with Azure Functions
 
Discover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation SuiteDiscover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation Suite
 
Bridge the gap with Chat Automation
Bridge the gap with Chat AutomationBridge the gap with Chat Automation
Bridge the gap with Chat Automation
 
Automate Anything with Microsoft Flow
Automate Anything with Microsoft FlowAutomate Anything with Microsoft Flow
Automate Anything with Microsoft Flow
 
Automate everything with PowerShell
Automate everything with PowerShellAutomate everything with PowerShell
Automate everything with PowerShell
 
Automate yourself out of a job - Use ChatOps!
Automate yourself out of a job - Use ChatOps!Automate yourself out of a job - Use ChatOps!
Automate yourself out of a job - Use ChatOps!
 
Create awesome Azure Functions with PowerShell
Create awesome Azure Functions with PowerShellCreate awesome Azure Functions with PowerShell
Create awesome Azure Functions with PowerShell
 
Microsoft Flow and PowerShell combined to automate everything
Microsoft Flow and PowerShell combined to automate everythingMicrosoft Flow and PowerShell combined to automate everything
Microsoft Flow and PowerShell combined to automate everything
 
Workshop automating with microsoft flow
Workshop   automating with microsoft flowWorkshop   automating with microsoft flow
Workshop automating with microsoft flow
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure Functions
 
Using Microsoft Flow for IT Professionals
Using Microsoft Flow for IT ProfessionalsUsing Microsoft Flow for IT Professionals
Using Microsoft Flow for IT Professionals
 
Automating everything with Microsoft Flow
Automating everything with Microsoft FlowAutomating everything with Microsoft Flow
Automating everything with Microsoft Flow
 
Go with the flow!
Go with the flow!Go with the flow!
Go with the flow!
 
Navigate around the edge with PowerShell
Navigate around the edge with PowerShellNavigate around the edge with PowerShell
Navigate around the edge with PowerShell
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOpsUsing Chat Automation - ChatOps
Using Chat Automation - ChatOps
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure Functions
 
Bringing Dev and Ops together with ChatOps
Bringing Dev and Ops together with ChatOpsBringing Dev and Ops together with ChatOps
Bringing Dev and Ops together with ChatOps
 

Recently uploaded

inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 

Recently uploaded (20)

inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 

Reach the next level with PowerShell

  • 1. Reach the next level with PowerShell Jaap Brasser @jaap_brasser
  • 2. @Jaap_Brasser jaapbrasser.com/about • PowerShell Conf EU/Asia • Dutch PowerShell User Group • Blogging • GitHub • PowerShell Gallery • TechNet Forums/Gallery
  • 4. PowerShell versions • How to check your PowerShell version: OS PowerShell version Windows 7, Server2008R2 2.0 Windows 8, Server2012 3.0 Windows 8.1, Server 2012R2 4.0 Windows 10, Server 2016 5.0 Windows 10 Creators Update 5.1 $PSVersionTable
  • 6. Agenda What are we building?
  • 7. Requirements 1. Structured output – Objects! 2. Hostname of the system 3. Domain name of system 4. OS info 5. Memory info 6. System disk 7. Pagefile 8. IP info 9. Create a function
  • 8. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 1 Retrieve hostname
  • 9. Demo Summary • Found the host name of the system • Looked at PowerShell drives • Explored the Env: drive • Found the hostname of the system • Created a PowerShell object • Exported the object to csv • Opened csv in Excel
  • 10. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 2 Get System Domain
  • 11. Demo Summary • Found the user domain • Found the system domain • Merged output with previous output
  • 12. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 3 OS Information
  • 13. Demo Summary • Used the Win32_OperatingSystem class • Retrieved the information • Established Get-WmiObject is obsolete • Used Get-CimInstance • Help examples with array indexing • Used WQL to speed up query • Get-CimInstance hiding output
  • 14. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 4 Memory information
  • 15. Demo Summary • Retrieved information from ComputerSystem • Divided by GB • Strong typed as integer to remove rounding • Used format operator to create string
  • 16. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 5 Timezones
  • 17. Demo Summary • Used the Get-TimeZone cmdlet • Found out that the timezone description does not take DST into account • Used [datetime] type accelerator • UtcNow • Now • Calculated actual time difference • Combined output into a single string
  • 18. • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 6 System disk size
  • 19. Demo Summary • Find out which disk is the system disk • Find out how big the disk is • Create the correct WQL query • Format output into a string • Set number of decimals for size in GB with [math]::round
  • 20. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 7 Pagefile from registry
  • 21. Demo Summary • Found the registry provider PSDrive • Looked at the ‘Memory Management’ key • Retrieved the information using Get- ItemProperty • Used the –join operator to collapse the array
  • 22. Agenda • Differences between editors • Configure VSCode • Working with Vscode • Setting up the ISE • Working with the ISE and ISESteroids • Questions Demo 8 Create the function
  • 23. Demo Summary • Create the Get-ComputerInformation function • Create a hashtable • Fill the values in the hashtable using output from the commands created • Convert the hashtable to a PowerShell custom object • Ran the function