end to end automation with mdt managing your reference images. fred bainbridge @fredbainbridge...
TRANSCRIPT
End to End Automation with MDTManaging your reference images.
Fred Bainbridge@[email protected]
Daniel [email protected]
#MMSMOA
@FredBainbridge
Sr. Infrastructure Engineer
MNSCUG, President
FredBainbridge.com
15+ years experience.
Minneapolis, Minnesota
Fred Bainbridge
Speaker picture
#MMSMOA
@potentengineer
Technology Architect
Co-founder LouSMUG.org
10+ years
experience
Louisville, KY
Daniel Ratliff
Get Involved (Keep the internet awesome)
Join or Start your local user group.
Participate in forums• Technet•MyItForum• Etc
Keep a blog.
What this is not -
How to build a reference image.
A ConfigMgr OSD deep dive.See: Hacking the Task Sequence
How to write PowerShell• Learn PowerShell in a Month of Lunches
What this is -
Solving a business problem.
Automating the reference image creation..…and all that other crap.
Utilizing simple PowerShell to make life easier.
Defining the Business Problem
What is impacted? • Build Time, accuracy, etc.
Why is this needed?• Security Requirements, Lifecycle, etc.What is the $ Metric?• Hours / Month? Hours / Build? etc.
Getting Starting
Identify what you need to automate. ( )• There is more than just the OS image.
Example Crap -• Setup a virtual machine• Stage the device in WDS• Start the reference image build•Update a pilot or production task sequence•Update Azure image• Clean up• Log your actions
Technical Lab Details
Hyper-V VMs• Server1
MDT 2013WDS w/ PXE
- Respond only to known hosts- Not AD integrated
• Server 2 DHCP, DNS
• [TSID] – VM for the reference build.- Pre determined MAC address.
MDT Details
Full CustomSettings.ini
Monitoring must be enabled.
The task sequence ID will match the VM name.
MDT Image automation with Orchestrator
Built off Fred’s scripts• Same LAB setup•Uses SCOrch for all automation•Uses PowerShell for all runbook steps• Leverages PowerShell 2.0 for native compatibility• Modified to function with SCOrch• Reference scripts included for testing
• Single runbook for simplicity’s sake•Nothing left behind except captured .wim
MDT Details – CustomSettings.ini
Slightly modified CustomSettings.ini• .wim is timestamped (TSID_MMDDYYYY.wim)• Runbook parameter must match MAC• Runbook parameter must match Task Sequence ID
SCOrch Details – Runbook
All steps return Result variable: Success or Fail• Only continue on Success
Easily modified for value adds• Send an email on success/fail?• Add .wim to deployment task sequence?
Required parameters• MDT server• MDT deployment share• MDT task sequence ID• WDS server• Hyper-V server• Hyper-V switch name• Hyper-V VM root path• Hyper-V VM MAC address
Other ways to Automate
SMAAzure AutomationService Manager (any Service Management Tool)Mostly Automated
Phase 2 / The next level
Incident / Request Management• This one matters the most.
Self Service PortalSharePoint/CollaborationNotificationsTest BuildsScheduling Logic
Discussion - Who said it?
“Building golden images is a bad practice – stop now”https://twitter.com/hypervserver/status/659505395472441345
-Jeffrey Snover
References
PS Module and Example Scripts http://1drv.ms/1NxyX9lCredentialshttps://technet.microsoft.com/en-us/library/hh849815.aspxInvoke-Commandhttp://fredbainbridge.com/index.php/powershell/29-invoke-command-exampleJohanhttp://deploymentresearch.com/PowerShell Function Outline (ctrl+j)https://technet.microsoft.com/en-us/magazine/hh360993.aspx
References continued
Johan Arwidmark - Building references images like a boss!http://deploymentresearch.com/Research/Post/357/Building-reference-images-like-a-boss
Ryan Andorfer - MMS 2014 - Future of SCOrchhttp://sched.co/1EkueSo
Hey Scripting Guy! – Use PowerShell to automate MDThttp://blogs.technet.com/b/heyscriptingguy/archive/2011/12/31/learn-how-to-use-powershell-to-automate-mdt-deployment.aspx
Evaluations: Please provide session feedback by clicking the EVAL button in the scheduler app (also download slides). One lucky winner will receive a free ticket to the next MMS!Session Title: Automating End to End Image Creation with MDT and PowerShell
Discuss…
Ask your questions-real world answers!Plenty of time to engage, share knowledge.
SPO
NSO
RS