SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 guiJaap Brasser
 
Automating security with PowerShell
Automating security with PowerShellAutomating security with PowerShell
Automating security with PowerShellJaap 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 jobJaap 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 JEAJaap 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 everythingJaap Brasser
 
Building your own JEA Configuration
Building your own JEA ConfigurationBuilding your own JEA Configuration
Building your own JEA ConfigurationJaap Brasser
 
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 & DSCJosh Gillespie
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint AdminsRick Taylor
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDRavikanth Chaganti
 
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 2016Ravikanth Chaganti
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeSascha Möllering
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend ToolchainBruno Abrantes
 
Command box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLCommand box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLColdFusionConference
 

Was ist angesagt? (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
 

Ähnlich wie 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
 
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 MinutesMalin Weiss
 
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 MinutesSpeedment, Inc.
 
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 WorkbenchHoward 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činaSPC 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
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino DesignerPaul Withers
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
 
Introducing Widows 7
Introducing Widows 7Introducing Widows 7
Introducing Widows 7Gene Carboni
 
Testing microservices with docker
Testing microservices with dockerTesting microservices with docker
Testing microservices with dockerDenis Brusnin
 
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
 
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 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 databaseSpeedment, Inc.
 
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 databaseSpeedment, Inc.
 
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 correctlyAntonios Chatzipavlis
 

Ähnlich wie 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
 
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...
 
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 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
 
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
 
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
 

Mehr von 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 RubrikJaap 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 automationJaap 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 FunctionsJaap 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 FunctionsJaap Brasser
 
Discover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation SuiteDiscover Microsoft's Cloud Automation Suite
Discover Microsoft's Cloud Automation SuiteJaap Brasser
 
Bridge the gap with Chat Automation
Bridge the gap with Chat AutomationBridge the gap with Chat Automation
Bridge the gap with Chat AutomationJaap Brasser
 
Automate Anything with Microsoft Flow
Automate Anything with Microsoft FlowAutomate Anything with Microsoft Flow
Automate Anything with Microsoft FlowJaap Brasser
 
Automate everything with PowerShell
Automate everything with PowerShellAutomate everything with PowerShell
Automate everything with PowerShellJaap 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 PowerShellJaap 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 everythingJaap Brasser
 
Workshop automating with microsoft flow
Workshop   automating with microsoft flowWorkshop   automating with microsoft flow
Workshop automating with microsoft flowJaap Brasser
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure FunctionsJaap Brasser
 
Using Microsoft Flow for IT Professionals
Using Microsoft Flow for IT ProfessionalsUsing Microsoft Flow for IT Professionals
Using Microsoft Flow for IT ProfessionalsJaap Brasser
 
Automating everything with Microsoft Flow
Automating everything with Microsoft FlowAutomating everything with Microsoft Flow
Automating everything with Microsoft FlowJaap Brasser
 
Navigate around the edge with PowerShell
Navigate around the edge with PowerShellNavigate around the edge with PowerShell
Navigate around the edge with PowerShellJaap Brasser
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOpsUsing Chat Automation - ChatOps
Using Chat Automation - ChatOpsJaap Brasser
 
Automate it with Azure Functions
Automate it with Azure FunctionsAutomate it with Azure Functions
Automate it with Azure FunctionsJaap 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 ChatOpsJaap Brasser
 

Mehr von 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
 

Kürzlich hochgeladen

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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