Practical PowerShell Tips & Tricks MMS Minnesota 2014 Trevor Sullivan, Jeff Wouters, David O’Brien – @david_Obrien.

Slides:



Advertisements
Similar presentations
Great people, great experience, great passion Administering SharePoint with Windows PowerShell Go Beyond the Management Shell with SharePoint and Windows.
Advertisements

ASP.NET Programming with C# and SQL Server First Edition
Automating Microsoft Azure with PowerShell MMS Minnesota 2014 Trevor Sullivan and David O’Brien – #MMSMinnesota.
Trevor Sullivan Solution Architect Project Leadership Associates.
Advanced Infrastructures In System Center Configuration Manager 2012 R2 Jason blog.configmgrftw.com m Wally.
Visual Studio 2005 C# IDE Enhancements Luca Bolognese C# Program Manager Microsoft Corporation.
Your CMDB and PowerShell DSC: DevOps Techniques
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
Troubleshooting OS Deployment MMS Minnesota 2014 Johan Michael #MMSOSD.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
PowerShell DSC v. ConfigMgr Compliance Settings MMS Minnesota 2014 Greg Ramsey David O’Brien Sherry Kissinger #MMSMinnesota.
SCORCH – Fun Recipes for RunBooks MMS Minnesota 2014 Steve Jesok & Matthew #MMSSCOrch.
Learn How To Create Custom Reports in Google Analytics.
Service Models in SCOM with VSAE examples
Get MMS Right at Home Every Month MMS Minnesota 2014 How to start / grow / sustain a professional user group community. #MMSMinnesota #MMSCommunity #MMSLove.
Trevor Sullivan Solution Architect Project Leadership Associates.
Advanced MP Authoring and Design Getting outside of the wizard and into the MP code with VSAE MMS Minnesota 2014 Nathan Foreman Jonathan Almquist #MMSSCOM.
System Center Reporting Zero to Hero 15 minutes x 4 MMS Minnesota 2014 Samuel Erskine (Sam) Dieter Gasser (Didi) IT Driving Fellow Principal Consultant.
C# Intro Programming languages and programs: Source code and object code Editors and compilers C# fundamentals: Program structure Classes and Objects Variables.
Yes, Applications DO work in task sequences!
Applications Development
Chapter 4 Introduction to Classes, Objects, Methods and strings
Taking Control of Visual Studio through Extensions and Extensibility Anthony Cangialosi Senior Program Manager Lead Microsoft Corporation DEV311.
End to End Automation with MDT Managing your reference images. Fred om Daniel
JSP Pages. What and Why of JSP? JSP = Java code imbedded in HTML or XML –Static portion of the page is HTML –Dynamic portion is Java Easy way to develop.
Service Management Automation: 3,2,1, Automate!
A ConfigMgr 2012 Site Review MMS Minnesota 2014 Kent Agerlund / Steve Thomson.
Windows 10 Setup InternalsWindows 10 Setup Internals Johan
Are you Ready for Configuration Manager vNext?
PowerShell Package Management for the Enterprise Kirk Aleksandar
Windows 10 Feature & Servicing Updates Options and Demystifying Steven Rachui
Define, bundle, deployDefine, bundle, deploy Working with Windows Server Containers and Docker James David O’Brien.
Oracle Data Integrator User Functions, Variables and Advanced Mappings
Nano ServerNano Server The Future of Window Server Mikael Johan
House of tails dogs charity All donations go 100% to the charity #MMSGIVEBACK.
Managing iOS Device Using ConfigMgr and Intune Hybrid MDM John Presenter #2 Twitter Handle Blog or address.
PowerShell Community Handbook Kirk Aleksandar
Automating Reference ImagesAutomating Reference Images Henrik Blog.coretech.dk/hra Kent Blog.coretech.dk/kea.
How to Model an Application for Monitoring Nathan Jonathan
Introduction to Administering a SQL Server Matthew Steve Thompson, stevethompsonmvp.wordpress.com.
The Art of deploying Windows 10 With ConfigMgr 2012 R2 Johan Mikael
XPlatform ManagementxPlatform Management Windows Provisioning from *nix David James.
Midwest Management Summit MMSSQL – What are Your SQL Reporting Questions? #MMSMinnesot a #MMSSQL.
ConfigMgr 2012 SQL Refresher MMS Minnesota 2014 Matthew Teegarden/Steve Thompson.
ConfigMgr 2012 Jeopardy Quiz MMS Minnesota 2014 Kim Oppalfens & Kent Agerlund Microsoft MVP: Enterprise Client Management #MMSJeopardy.
Introduction to T-SQL – Part Deux Matthew Sherry Kissinger kissinger.
OS Deployment - LEVEL 500OS Deployment - LEVEL 500 Johan
App-V: An Overview MMS Minnesota 2014 Fred #MMSMinnesota #MMSAppV.
Restricted Admin & Credential Exposure MMS Minnesota 2014 Hasain Alshakarti – TrueSec Enterprise Security #MMSMinnesota #MMSConfigMgr #MMSLove.
Server OS Deployment Deep Dive with two crazy guys and ConfigMgr 2012 R2 MMS Minnesota 2014 Greg Nash.
900 Degrees of Service Manager with 3 International System Center Chefs MMS Minnesota 2014 Steve Buchanan (System Center MVP) Dieter Gasser (CPMB - Author)
Sweet SUITE Imaging MMS Minnesota 2014 #MMSMinnesota #MMSConfigMgr #MMSLove Steven Rachui Premier Field Engineer Microsoft Corporation
SQL Tips & Tricks Best practices from the field John Nelson Apps Systems Engineer Steve Thompson Senior Consultant,
Real Life Enterprise PKI MMS Minnesota 2014 Hasain Alshakarti – TrueSec Enterprise Security #MMSMinnesota #MMSConfigMgr #MMSLove.
Long Live Azure Automation!Long Live Azure Automation! Cloud-first Configuration Management and Automation Beth Cooper Program Manager.
Winning at Virtualization Management with System Center MMS Minnesota 2014 James Moots Veeam Software Manager, Systems Engineers.
© 2016, Mike Murach & Associates, Inc.
Migrating Infrastructure to Microsoft Azure
PYTHON: AN INTRODUCTION
TechEd /3/2018 4:18 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Building an Automated Cloud Image Factory
Authoring Azure JSON Templates
BR013.
Tonga Institute of Higher Education
DEV354 Visual Studio 2005: New Enhancements For Debugging Applications
Deep Dive into Azure API Apps and Logic Apps
Presenter # 1 • Presenter # 2 • Presenter # 3
Tech Ed North America /27/ :04 AM Required Slide
DEV322 Visual Studio 2005 C# IDE Enhancements
Analytics Tips and Tricks
Presentation transcript:

Practical PowerShell Tips & Tricks MMS Minnesota 2014 Trevor Sullivan, Jeff Wouters, David O’Brien – @david_Obrien #MMSMinnesota #MMSConfigMgr #MMSLove

MMS Minnesota 2014 Speaker Profile – David O’Brien MVP for Enterprise Client Management Heavily focused on Automation Blog: Principal Consultant at Dilignet in Melbourne

MMS Minnesota 2014 Speaker Profile – Trevor Sullivan Director of Training and Product Opsgility Likes trying new craft beers Passionate about spreading knowledge and awareness Microsoft MVP for Windows PowerShell

Speaker Profile – Jeff Wouters MVP Windows PowerShell | BSc | MBA MBA Psychology Lead Infrastructure DevOps Scripting, Automating, darts, beer. Blog:

Social Media MMS Minnesota 2014 #PSDSC #PowerShell

Agenda Prompt Function Splatting (v3) Where and ForEach Method Syntax (v4) Classes (v5) PSTypeNames.NET Formatting Variable Squeezing Type Casting Evaluations MMS Minnesota 2014

Splatting (v3) Easier to read code Separates input data from script logic Downside: No Intellisense for parameters HashTable (Parameters) HashTable (Parameters) Command Call

Where/ForEach Method Syntax Use a fluent-style syntax instead of PowerShell pipeline Filter (Where) Filter (Where) Objects ForEach

Classes (v5) Create custom object types Add properties and methods Decorate classes with existing attributes Lexical vs. dynamic scoping of variables Class Properties Methods Constructors Overloads Static Initializers Private class members are not supported Inheritance / interfaces not supported Namespaces

PSTypeNames Append custom type names to existing objects Apply a custom type to a PSCustomObject Use the [PSTypeName()] parameter attribute to constrain input objects Object PSTypeNames PSTypeName

.NET Formatting Value substitution Date formatting Numeric formatting Custom formatters Format String Objects

Variable Squeezing Simplified syntax to assign variables and print output

Type Casting Convert objects from one type to another Explicitly declare variable types Some types support “Parse” method instead Int32 Int64

PowerShell ISE Tips New PowerShell Tabs (Runspaces) Invoke Intellisense Snippets Console vs. Script Pane Horizontal/vertical split vs. script-only view ISESteroids MMS Minnesota 2014

Session Title Evaluations Please provide session feedback by clicking the Eval button in the scheduler app. One lucky winner will get a free ticket to the next MMS! Visit all of our sponsors in the expo area and online! Platinum Sponsors: Gold Sponsors : MMS Minnesota 2014