SlideShare a Scribd company logo
1 of 86
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Introduction to PowerShell
MICHAEL BLUMENTHAL AND JACK FRUH
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Who is Michael Blumenthal?
• Technical Solution Evangelist
at PSC Group
• Office 365 MVP
• Dev/ITPro Mix
• In IT Consulting since 1995
• PowerShelling since 2007
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Who is Jack Fruh?
• Cloud Architect
• Fortune 500 Company
• Big on community
• SPS Chicago Suburbs Co-
Leader
• SharePointJack.com
• SharePoint-Community.org
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
This is about you
• Everyone have a laptop with you?
• Do you have PowerShell installed?
• Anyone used PowerShell before?
• Who’s done scripting before?
• Admin or Developer?
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Introduce Yourself
• Your Name
• Company Size
• Your Role
• O365 or SharePoint On Prem Version?
• Where you are in your PowerShell journey
• One thing you want PowerShell to solve?
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
What is PowerShell?
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Why is PowerShell AWESOME?
Write-Host “SO easy to use!”
No Compiling!
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
• It’s Easy to Get Started!1
• Learn the PowerShell Syntax2
• Real World Examples3
• Best Practices4
• More Resources & Raffle5
PowerShell puts .NET at your fingertips!
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 1
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Getting Started with PowerShell
2003
2008,R2
2012, R2
2016
7, 8, 8.1, 10
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
The Command Line Window
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Windows Feature
Win
8.x
Win
8-10
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
The Integrated Script Editor
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
PowerShell V3-5 ISE
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Intellisense!
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Now Run PowerShell
• $PSVerTable
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 2
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Symbols, Keywords, and Syntax! Oh
My!
• Variables1
• Commands2
• Piping3
• Comparisons4
• Flow Control5
• Filtering6
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Reading Symbols in Code
• (tal Guidance
• Moe, Larry, and }
• The universe started with
the Big !
• !Important
• A # of Bacon and # Browns
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Variables
• Case Insensitive, Dynamic typing
$something
$true, $false, $null, $profile
$myMessage= “Hello, World”
1
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Create a Variable
• Assign something to it
• Get its value
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Commands are called cmdlets.
Verb-Noun
Built-in, Extensible
Get-Help
Get-Member
Get-Command
2
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Help!
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Get-Help About_<CTRL+Space>
Discoverability
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Get-Command
• Find Cmdlets
• Get details of cmdlets and applications
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Get-command get-date
• Get-date | Get-member
• Name a method!
• Get-command *SPO*
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Our Turn
• Get-help
• Get-command –noun
• Get-member
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Aliases
Alias
• Dir
• Sort
• Select
• Foreach, also %
cmdlet
• Get-ChildItem
• Sort-object
• Select-object
• Foreach-object
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Get-Alias
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
The Power of Piping!
Output Of
Command 1
Input of
Command 2
3
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Example
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Pipe Demo!
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Get-ChildItem | select –first 10
• Get-ChildItem| select -first 10 |
Sort-Object -Property
LastAccessTime | Select-Object -
Property LastAccessTime, Name
•
•
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Dial zero for an…4
Operator
-eq -le
-ne -like
-gt -notlike
-ge -match
-lt -notmatch
Example
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Taking Control of the Flow
• If (Test) {Commands} else {Commands}
• if ($web.Title –ne “”) {Write-Host $web.Title}If
• For (Init;Test;Repeat) {Commands}
• for($i=1; $i -le 10; $i++) {Write-Host $i}For
• Foreach (Item in Collection) {Commands}
• Foreach ($gumball in $CandyBag) {$gumball.color}
• Collection | Foreach {Commands}
ForEach
• While (Condition){Commands}
• while($val -ne 3){$val++; Write-Host $val}While
5
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Example
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Comparisons
• Arrays and Loops
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Where-Object
•Where {<Test>}Syntax
• V1&2:
Dir | Where {$_.Name –like “B*”}
• V3+:
Dir | where Name –like B*
Example
6
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Your Turn
• Where
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Executing Scripts
.filename.ps1
Set-ExecutionPolicy
Unrestricted
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Use Functions
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Follow the Naming Convention!
•
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Modules
•
•
• env:
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 3
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
SharePoint On Prem
• SharePoint On Prem
• SharePoint Management Console
• 15 Hive POSH Script
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Office 365
• SharePoint Online Management Console
• Office Dev PnP PowerShell
• Connect-SPOService
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
DEMO – SPO Sites
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Parking Lot Question Check
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 4
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Jack’s Scripts
• Examples
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Real World Examples
• Dell Service Tag
• Flashcards
• Audio Alerts
• File Conversion & Text Manipulation
• Managing Servers at Scale
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Flash
Cards
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Get-DellServiceTag
• Get-WmiObject win32_SystemEnclosure | select
serialnumber
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Audio Alerts
• Stick this at the end of your long running script:
$Voice = new-object -com SAPI.SpVoice
$Voice.Speak(“Deployment is done!")
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
File and Text Wrangling
• Word
• Auto
DOCX
• RegEx
• PSObj
TXT
• Export-
• CSV
CSV
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Server Management
Server/Service Examples of
What you can script
Azure Virtual Machines
Exchange Mailboxes
Office 365 Sites
SharePoint Everything
SQL Queries
Windows Server File system
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 5
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Comment your functions
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Search for Commands
Refresh the command list
Actions you can take
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Self Announcing Functions
…
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Source Code Control
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Always read scripts before running
them
More Good Ideas
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Always read scripts before running them.
Make yours safe when others don’t
More Good Ideas
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Always read scripts before running
them
Make yours safe when others don’t
Check for valid parameter values
get-help
about_Functions_Advanced_Parameters
More Good Ideas
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Always read scripts before running them
Make yours safe when others don’t
Check for valid parameter values
get-help
about_Functions_Advanced_Parameters
Do error handling
get-help about_Try_Catch_Finally
get-help about_CommonParameters
-ErrorAction and -ErrorVariable
More Good Ideas
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Chapter 6
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
TechCommunity.microsoft.com
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
PowerShell.org
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
SharePoint Jack
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Get Jack’s Cheat Sheet
http://bit.ly/poshref
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Blumenthal’s Blog: MichaelBlumenthal.me
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Interview with Don Jones
• http://www.runasradio.com/Sho
ws/Show/505
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Contact Us
• mblumenthal@psclistens.com
• 847-275-7247
• @MichaelBL
• http://bit.ly/MBB-LI
• https://Michaelblumenthal.me
• http://bit.ly/JoinChiITEvents
• Jack@SharePointJack.com
• @sharepointjack
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Script something today!
It’s Easy to Get
Started!
PowerShell
Syntax
More Resources
In Review…
© 2016 PSC Group, LLC
© 2016 PSC Group, LLC
Raffle
Surveys
86
Feedback Please!
Session Surveys via Event App
Select “Schedule” -> Select Session
-> Scroll to “Session Survey”
Download the App:
Event URL https://crowd.cc/chi2016
Your App URL https://crowd.cc/s/mGoA
Or search for “SharePoint Fest” in
App Store
Learn from the Top SharePoint Experts
SharePoint Fest
Chicago 2016
WWW.SHAREPOINTFEST.COM

More Related Content

Similar to Introduction to PowerShell (SharePoint Fest Chicago 2016 Workshop)

Illuminating the potential of Scrum by comparing LeSS with SAFe
Illuminating the potential of Scrum by comparing LeSS with SAFeIlluminating the potential of Scrum by comparing LeSS with SAFe
Illuminating the potential of Scrum by comparing LeSS with SAFeRowan Bunning
 
Illuminating scrum by comparing LEsS with safe - Rowan Bunning
Illuminating scrum by comparing LEsS with safe - Rowan BunningIlluminating scrum by comparing LEsS with safe - Rowan Bunning
Illuminating scrum by comparing LEsS with safe - Rowan BunningScrum Australia Pty Ltd
 
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...Gene Kim
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMax Pronko
 
SD DevOps Meet-up - Exploring Quadrants of DevOps Maturity
SD DevOps Meet-up - Exploring Quadrants of DevOps MaturitySD DevOps Meet-up - Exploring Quadrants of DevOps Maturity
SD DevOps Meet-up - Exploring Quadrants of DevOps MaturityBrian Dawson
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsAmazon Web Services
 
Overcoming Organizational Obstacles to DevOps & Continuous Delivery
Overcoming Organizational Obstacles to DevOps & Continuous Delivery Overcoming Organizational Obstacles to DevOps & Continuous Delivery
Overcoming Organizational Obstacles to DevOps & Continuous Delivery XebiaLabs
 
Enabling Enterprise DevOps at Scale
Enabling Enterprise DevOps at ScaleEnabling Enterprise DevOps at Scale
Enabling Enterprise DevOps at ScaleBob Sokol
 
Datameer6 for prospects - june 2016_v2
Datameer6 for prospects - june 2016_v2Datameer6 for prospects - june 2016_v2
Datameer6 for prospects - june 2016_v2Datameer
 
OWASP TOP10 2017 - Nowa lista przebojów podatności
OWASP TOP10 2017 - Nowa lista przebojów podatnościOWASP TOP10 2017 - Nowa lista przebojów podatności
OWASP TOP10 2017 - Nowa lista przebojów podatnościklagrz
 
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...Gene Kim
 
Integrating Cloud-based performance test in VSTS with SOASTA CloudTest
Integrating Cloud-based performance test in VSTS with SOASTA CloudTestIntegrating Cloud-based performance test in VSTS with SOASTA CloudTest
Integrating Cloud-based performance test in VSTS with SOASTA CloudTestJennifer Finney
 
The Cloud and You - the ’as a service’ disruption you can’t ignore
The Cloud and You - the ’as a service’ disruption you can’t ignoreThe Cloud and You - the ’as a service’ disruption you can’t ignore
The Cloud and You - the ’as a service’ disruption you can’t ignoreJohn Head
 
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comReaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comKlaus Salchner
 
Ian Margetts - ASOS’ Journey to Continuous Deployment
Ian Margetts - ASOS’ Journey to Continuous DeploymentIan Margetts - ASOS’ Journey to Continuous Deployment
Ian Margetts - ASOS’ Journey to Continuous DeploymentWinOps Conf
 
Everything You Need for a Viral Game, Except the Game
Everything You Need for a Viral Game, Except the GameEverything You Need for a Viral Game, Except the Game
Everything You Need for a Viral Game, Except the GameAmazon Web Services
 
ERE Webinar: Future-Proof Recruiting by Building Talent Pipelines
ERE Webinar: Future-Proof Recruiting by Building Talent PipelinesERE Webinar: Future-Proof Recruiting by Building Talent Pipelines
ERE Webinar: Future-Proof Recruiting by Building Talent PipelinesSmashFly Technologies
 
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWS
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWSDevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWS
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWSAmazon Web Services
 

Similar to Introduction to PowerShell (SharePoint Fest Chicago 2016 Workshop) (20)

Illuminating the potential of Scrum by comparing LeSS with SAFe
Illuminating the potential of Scrum by comparing LeSS with SAFeIlluminating the potential of Scrum by comparing LeSS with SAFe
Illuminating the potential of Scrum by comparing LeSS with SAFe
 
Illuminating scrum by comparing LEsS with safe - Rowan Bunning
Illuminating scrum by comparing LEsS with safe - Rowan BunningIlluminating scrum by comparing LEsS with safe - Rowan Bunning
Illuminating scrum by comparing LEsS with safe - Rowan Bunning
 
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...
DOES16 San Francisco - Marc Ng - SAP’s DevOps Journey: From Building an App t...
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
 
SD DevOps Meet-up - Exploring Quadrants of DevOps Maturity
SD DevOps Meet-up - Exploring Quadrants of DevOps MaturitySD DevOps Meet-up - Exploring Quadrants of DevOps Maturity
SD DevOps Meet-up - Exploring Quadrants of DevOps Maturity
 
Automating Operations Workload
Automating Operations WorkloadAutomating Operations Workload
Automating Operations Workload
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Overcoming Organizational Obstacles to DevOps & Continuous Delivery
Overcoming Organizational Obstacles to DevOps & Continuous Delivery Overcoming Organizational Obstacles to DevOps & Continuous Delivery
Overcoming Organizational Obstacles to DevOps & Continuous Delivery
 
Enabling Enterprise DevOps at Scale
Enabling Enterprise DevOps at ScaleEnabling Enterprise DevOps at Scale
Enabling Enterprise DevOps at Scale
 
Datameer6 for prospects - june 2016_v2
Datameer6 for prospects - june 2016_v2Datameer6 for prospects - june 2016_v2
Datameer6 for prospects - june 2016_v2
 
OWASP TOP10 2017 - Nowa lista przebojów podatności
OWASP TOP10 2017 - Nowa lista przebojów podatnościOWASP TOP10 2017 - Nowa lista przebojów podatności
OWASP TOP10 2017 - Nowa lista przebojów podatności
 
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...
DOES16 London - Darren Hague - SAP’s DevOps Journey: From Building an App to ...
 
Integrating Cloud-based performance test in VSTS with SOASTA CloudTest
Integrating Cloud-based performance test in VSTS with SOASTA CloudTestIntegrating Cloud-based performance test in VSTS with SOASTA CloudTest
Integrating Cloud-based performance test in VSTS with SOASTA CloudTest
 
The Cloud and You - the ’as a service’ disruption you can’t ignore
The Cloud and You - the ’as a service’ disruption you can’t ignoreThe Cloud and You - the ’as a service’ disruption you can’t ignore
The Cloud and You - the ’as a service’ disruption you can’t ignore
 
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comReaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
 
Ian Margetts - ASOS’ Journey to Continuous Deployment
Ian Margetts - ASOS’ Journey to Continuous DeploymentIan Margetts - ASOS’ Journey to Continuous Deployment
Ian Margetts - ASOS’ Journey to Continuous Deployment
 
Everything You Need for a Viral Game, Except the Game
Everything You Need for a Viral Game, Except the GameEverything You Need for a Viral Game, Except the Game
Everything You Need for a Viral Game, Except the Game
 
Advances in SAFe DevOps
Advances in SAFe DevOpsAdvances in SAFe DevOps
Advances in SAFe DevOps
 
ERE Webinar: Future-Proof Recruiting by Building Talent Pipelines
ERE Webinar: Future-Proof Recruiting by Building Talent PipelinesERE Webinar: Future-Proof Recruiting by Building Talent Pipelines
ERE Webinar: Future-Proof Recruiting by Building Talent Pipelines
 
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWS
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWSDevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWS
DevOps on AWS: Advanced Techniques for Amazon EC2 Deployments on AWS
 

More from Michael Blumenthal (Microsoft MVP)

January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) Meeting
January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) MeetingJanuary 2020 Office 365 Adoption Users Group (Chicagoland Chapter) Meeting
January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) MeetingMichael Blumenthal (Microsoft MVP)
 

More from Michael Blumenthal (Microsoft MVP) (20)

Tracking what's new and next for Teams in Your tenant.pptx
Tracking what's new and next for Teams in Your tenant.pptxTracking what's new and next for Teams in Your tenant.pptx
Tracking what's new and next for Teams in Your tenant.pptx
 
Collaboration Fundamentals - ALI Modern Intranets May 2023
Collaboration Fundamentals - ALI Modern Intranets May 2023Collaboration Fundamentals - ALI Modern Intranets May 2023
Collaboration Fundamentals - ALI Modern Intranets May 2023
 
Hidden Gems of Office - Teams Day Online Sept 2022
Hidden Gems of Office - Teams Day Online Sept 2022Hidden Gems of Office - Teams Day Online Sept 2022
Hidden Gems of Office - Teams Day Online Sept 2022
 
So You Think You Have OneDrive Deployed.pptx
So You Think You Have OneDrive Deployed.pptxSo You Think You Have OneDrive Deployed.pptx
So You Think You Have OneDrive Deployed.pptx
 
Toastmasters Word of the Day - Feghoot.pptx
Toastmasters Word of the Day - Feghoot.pptxToastmasters Word of the Day - Feghoot.pptx
Toastmasters Word of the Day - Feghoot.pptx
 
10 Tips to Make You A Better Speaker.pptx
10 Tips to Make You A Better Speaker.pptx10 Tips to Make You A Better Speaker.pptx
10 Tips to Make You A Better Speaker.pptx
 
Hidden Gems of Microsoft Office
Hidden Gems of Microsoft OfficeHidden Gems of Microsoft Office
Hidden Gems of Microsoft Office
 
October 2020 Office 365 Adoption Users Group meeting agenda
October 2020 Office 365 Adoption Users Group meeting agendaOctober 2020 Office 365 Adoption Users Group meeting agenda
October 2020 Office 365 Adoption Users Group meeting agenda
 
August 2020 Office 365 Adoption Users Group meeting agenda
August 2020 Office 365 Adoption Users Group meeting agendaAugust 2020 Office 365 Adoption Users Group meeting agenda
August 2020 Office 365 Adoption Users Group meeting agenda
 
Lessons Learned while Deploying OneDrive Sync
Lessons Learned while Deploying OneDrive SyncLessons Learned while Deploying OneDrive Sync
Lessons Learned while Deploying OneDrive Sync
 
2020 July Office 365 AI news for the Midwest AI Group (MAIG)
2020 July Office 365 AI news for the Midwest AI Group (MAIG)2020 July Office 365 AI news for the Midwest AI Group (MAIG)
2020 July Office 365 AI news for the Midwest AI Group (MAIG)
 
June 2020 Office 365 Adoption User Group meeting agenda
June 2020 Office 365 Adoption User Group meeting agendaJune 2020 Office 365 Adoption User Group meeting agenda
June 2020 Office 365 Adoption User Group meeting agenda
 
May 2020 Office 365 Adoption User Group Meeting Agenda
May 2020 Office 365 Adoption User Group Meeting AgendaMay 2020 Office 365 Adoption User Group Meeting Agenda
May 2020 Office 365 Adoption User Group Meeting Agenda
 
M365 The Tour Israel: Deploying OneDrive Sync
M365 The Tour Israel: Deploying OneDrive SyncM365 The Tour Israel: Deploying OneDrive Sync
M365 The Tour Israel: Deploying OneDrive Sync
 
April 2020 Office 365 Adoption Users Group meeting agenda
April 2020 Office 365 Adoption Users Group meeting agendaApril 2020 Office 365 Adoption Users Group meeting agenda
April 2020 Office 365 Adoption Users Group meeting agenda
 
Overview of Office 365: The Elephant in the Room
Overview of Office 365: The Elephant in the RoomOverview of Office 365: The Elephant in the Room
Overview of Office 365: The Elephant in the Room
 
Deploying OneDrive Sync
Deploying OneDrive SyncDeploying OneDrive Sync
Deploying OneDrive Sync
 
February 2020 Office 365 Adoption Users Group Sponsor Slides
February 2020 Office 365 Adoption Users Group Sponsor SlidesFebruary 2020 Office 365 Adoption Users Group Sponsor Slides
February 2020 Office 365 Adoption Users Group Sponsor Slides
 
February 2020 Office 365 Adoption Users Group meeting agenda
February 2020 Office 365 Adoption Users Group meeting agendaFebruary 2020 Office 365 Adoption Users Group meeting agenda
February 2020 Office 365 Adoption Users Group meeting agenda
 
January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) Meeting
January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) MeetingJanuary 2020 Office 365 Adoption Users Group (Chicagoland Chapter) Meeting
January 2020 Office 365 Adoption Users Group (Chicagoland Chapter) Meeting
 

Recently uploaded

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Introduction to PowerShell (SharePoint Fest Chicago 2016 Workshop)

  • 1. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Introduction to PowerShell MICHAEL BLUMENTHAL AND JACK FRUH
  • 2. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Who is Michael Blumenthal? • Technical Solution Evangelist at PSC Group • Office 365 MVP • Dev/ITPro Mix • In IT Consulting since 1995 • PowerShelling since 2007
  • 3. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Who is Jack Fruh? • Cloud Architect • Fortune 500 Company • Big on community • SPS Chicago Suburbs Co- Leader • SharePointJack.com • SharePoint-Community.org
  • 4. © 2016 PSC Group, LLC © 2016 PSC Group, LLC This is about you • Everyone have a laptop with you? • Do you have PowerShell installed? • Anyone used PowerShell before? • Who’s done scripting before? • Admin or Developer?
  • 5. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Introduce Yourself • Your Name • Company Size • Your Role • O365 or SharePoint On Prem Version? • Where you are in your PowerShell journey • One thing you want PowerShell to solve?
  • 6. © 2016 PSC Group, LLC © 2016 PSC Group, LLC What is PowerShell?
  • 7. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Why is PowerShell AWESOME? Write-Host “SO easy to use!” No Compiling!
  • 8. © 2016 PSC Group, LLC © 2016 PSC Group, LLC • It’s Easy to Get Started!1 • Learn the PowerShell Syntax2 • Real World Examples3 • Best Practices4 • More Resources & Raffle5 PowerShell puts .NET at your fingertips!
  • 9. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 1
  • 10. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Getting Started with PowerShell 2003 2008,R2 2012, R2 2016 7, 8, 8.1, 10
  • 11. © 2016 PSC Group, LLC © 2016 PSC Group, LLC The Command Line Window
  • 12. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Windows Feature Win 8.x Win 8-10
  • 13. © 2016 PSC Group, LLC © 2016 PSC Group, LLC The Integrated Script Editor
  • 14. © 2016 PSC Group, LLC © 2016 PSC Group, LLC PowerShell V3-5 ISE
  • 15. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Intellisense!
  • 16. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Now Run PowerShell • $PSVerTable
  • 17. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 2
  • 18. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Symbols, Keywords, and Syntax! Oh My! • Variables1 • Commands2 • Piping3 • Comparisons4 • Flow Control5 • Filtering6
  • 19. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Reading Symbols in Code • (tal Guidance • Moe, Larry, and } • The universe started with the Big ! • !Important • A # of Bacon and # Browns
  • 20. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Variables • Case Insensitive, Dynamic typing $something $true, $false, $null, $profile $myMessage= “Hello, World” 1
  • 21.
  • 22. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Create a Variable • Assign something to it • Get its value
  • 23. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Commands are called cmdlets. Verb-Noun Built-in, Extensible Get-Help Get-Member Get-Command 2
  • 24. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Help!
  • 25. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Get-Help About_<CTRL+Space>
  • 27. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Get-Command • Find Cmdlets • Get details of cmdlets and applications
  • 28. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Get-command get-date • Get-date | Get-member • Name a method! • Get-command *SPO*
  • 29. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Our Turn • Get-help • Get-command –noun • Get-member
  • 30. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Aliases Alias • Dir • Sort • Select • Foreach, also % cmdlet • Get-ChildItem • Sort-object • Select-object • Foreach-object
  • 31. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Get-Alias
  • 32. © 2016 PSC Group, LLC © 2016 PSC Group, LLC The Power of Piping! Output Of Command 1 Input of Command 2 3
  • 33. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Example
  • 34. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Pipe Demo!
  • 35. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Get-ChildItem | select –first 10 • Get-ChildItem| select -first 10 | Sort-Object -Property LastAccessTime | Select-Object - Property LastAccessTime, Name • •
  • 36. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Dial zero for an…4 Operator -eq -le -ne -like -gt -notlike -ge -match -lt -notmatch
  • 38. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Taking Control of the Flow • If (Test) {Commands} else {Commands} • if ($web.Title –ne “”) {Write-Host $web.Title}If • For (Init;Test;Repeat) {Commands} • for($i=1; $i -le 10; $i++) {Write-Host $i}For • Foreach (Item in Collection) {Commands} • Foreach ($gumball in $CandyBag) {$gumball.color} • Collection | Foreach {Commands} ForEach • While (Condition){Commands} • while($val -ne 3){$val++; Write-Host $val}While 5
  • 39. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Example
  • 40. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Comparisons • Arrays and Loops
  • 41. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Where-Object •Where {<Test>}Syntax • V1&2: Dir | Where {$_.Name –like “B*”} • V3+: Dir | where Name –like B* Example 6
  • 42. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Your Turn • Where
  • 43. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Executing Scripts .filename.ps1 Set-ExecutionPolicy Unrestricted
  • 44. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Use Functions
  • 45. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Follow the Naming Convention! •
  • 46. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Modules • • • env:
  • 47. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 3
  • 48. © 2016 PSC Group, LLC © 2016 PSC Group, LLC SharePoint On Prem • SharePoint On Prem • SharePoint Management Console • 15 Hive POSH Script
  • 49. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Office 365 • SharePoint Online Management Console • Office Dev PnP PowerShell • Connect-SPOService
  • 50. © 2016 PSC Group, LLC © 2016 PSC Group, LLC DEMO – SPO Sites
  • 51. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Parking Lot Question Check
  • 52. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 4
  • 53. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Jack’s Scripts • Examples
  • 54. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Real World Examples • Dell Service Tag • Flashcards • Audio Alerts • File Conversion & Text Manipulation • Managing Servers at Scale
  • 55. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Flash Cards
  • 56. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Get-DellServiceTag • Get-WmiObject win32_SystemEnclosure | select serialnumber
  • 57. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Audio Alerts • Stick this at the end of your long running script: $Voice = new-object -com SAPI.SpVoice $Voice.Speak(“Deployment is done!")
  • 58. © 2016 PSC Group, LLC © 2016 PSC Group, LLC File and Text Wrangling • Word • Auto DOCX • RegEx • PSObj TXT • Export- • CSV CSV
  • 59. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Server Management Server/Service Examples of What you can script Azure Virtual Machines Exchange Mailboxes Office 365 Sites SharePoint Everything SQL Queries Windows Server File system
  • 60. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 5
  • 61. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Comment your functions
  • 62. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Search for Commands Refresh the command list Actions you can take
  • 63. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Self Announcing Functions …
  • 64. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Source Code Control
  • 65. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Always read scripts before running them More Good Ideas
  • 66. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Always read scripts before running them. Make yours safe when others don’t More Good Ideas
  • 67. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Always read scripts before running them Make yours safe when others don’t Check for valid parameter values get-help about_Functions_Advanced_Parameters More Good Ideas
  • 68. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Always read scripts before running them Make yours safe when others don’t Check for valid parameter values get-help about_Functions_Advanced_Parameters Do error handling get-help about_Try_Catch_Finally get-help about_CommonParameters -ErrorAction and -ErrorVariable More Good Ideas
  • 69. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Chapter 6
  • 70. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 71. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 72. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 73. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 74. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 75. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 76. © 2016 PSC Group, LLC © 2016 PSC Group, LLC
  • 77. © 2016 PSC Group, LLC © 2016 PSC Group, LLC TechCommunity.microsoft.com
  • 78. © 2016 PSC Group, LLC © 2016 PSC Group, LLC PowerShell.org
  • 79. © 2016 PSC Group, LLC © 2016 PSC Group, LLC SharePoint Jack
  • 80. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Get Jack’s Cheat Sheet http://bit.ly/poshref
  • 81. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Blumenthal’s Blog: MichaelBlumenthal.me
  • 82. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Interview with Don Jones • http://www.runasradio.com/Sho ws/Show/505
  • 83. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Contact Us • mblumenthal@psclistens.com • 847-275-7247 • @MichaelBL • http://bit.ly/MBB-LI • https://Michaelblumenthal.me • http://bit.ly/JoinChiITEvents • Jack@SharePointJack.com • @sharepointjack
  • 84. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Script something today! It’s Easy to Get Started! PowerShell Syntax More Resources In Review…
  • 85. © 2016 PSC Group, LLC © 2016 PSC Group, LLC Raffle
  • 86. Surveys 86 Feedback Please! Session Surveys via Event App Select “Schedule” -> Select Session -> Scroll to “Session Survey” Download the App: Event URL https://crowd.cc/chi2016 Your App URL https://crowd.cc/s/mGoA Or search for “SharePoint Fest” in App Store Learn from the Top SharePoint Experts SharePoint Fest Chicago 2016 WWW.SHAREPOINTFEST.COM

Editor's Notes

  1. Servers, Desktop OS’s, any .NET API, web services, you name it! No Compliling!
  2. Who would like another tool in their toolbox? How about the swiss army knife of tools? It will make you a more productive developer!
  3. Who here already has installed and PowerShell? Who’s using Server 2003? 2008? Win 2008 – It’s an OS Feature – “servermanagercmd –install PowerShell”
  4. Intellisense!
  5. begin with a $ Name that Language… Similar to @variables in SQL, apparently also Ruby, PHP. Arrays start at 0
  6. Remove $opposite; add write-host; get-item
  7. Mention Aliases
  8. Get-Member examples
  9. Can you imagine trying to do this if this was just text?
  10. Get-Help about_flow_control Mention that collections start at 0
  11. Single purpose vs multitool
  12. Jack
  13. Does anyone want to see or hear about these – vote.
  14. Be a tool maker
  15. Windows PowerShell in Action by Bruce Payette, V2 Since then Hicks and Jones have written some good ones
  16. http://technet.microsoft.com/en-us/scriptcenter/
  17. http://technet.microsoft.com/en-us/scriptcenter/
  18. You owe it to yourself to try out PowerShell. It will make you a better developer!