SlideShare une entreprise Scribd logo
1  sur  12
Practical PowerShell for the
  Windows Administrator

           Jan Egil Ring
       Senior Consultant, Infrastructure
          jan.egil.ring@crayon.com
Agenda
            •      Specific scenarios
                   •   System Center Virtual Machine
                       Manager
                   •   Hyper-V
                   •   DNS
                   •   DHCP
            •      Profile- and module-management



January 22, 2012                  NIC 2012
Hyper-V Administration using System
Center Virtual Machine Manager
• Manage Hyper-V, VMware and XenServer
• Built on top of PowerShell
• Makes it easy to do bulk management, generate
  reports and so on.
• Automate baselines, best practices and tuning
• Demo: Generate reports of your virtual
  infrastructure and VM bulk-provisioning
 Recommended TechEd-video, Failover Clustering & Hyper-V :
 http://channel9.msdn.com/Events/TechEd/Europe/2010/WSV403
Hyper-V administration using
PowerShell
• Hyper-V PowerShell-module in Windows 8
  (both client and server) with ~150 cmdlets
• No PowerShell-module for managing Hyper-V
  in Windows Server 2008/2008 R2 from
  Microsoft
• Community module from James O`Neill
  (pshyperv.codeplex.com)
DNS
• Real world example: The domain is being
  upgraded to the latest version, and there has
  been made a decision not to re-use any IP
  addresses for the DNS servers
• Mission: Change DNS server settings on all
  servers in the domain
• Possible solution: Get/Set-DNSServerSearchOrder
 PowerShell Network Adapter Configuration Module by Jan Egil Ring:
 http://psnetadapterconfig.codeplex.com
DHCP administration using PowerShell
• Builtin PowerShell module in Windows Server
  8
• Wrapper-module around netsh available for
  downlevel server OS
• Demo: Bulk-create over 200 DHCP-scopes

 PowerShell Module for DHCP by Jeremy Engel: http://bit.ly/gxMLJJ
• Back to the SC VMM demo
Profile- and module-management
• Design how you will manage PowerShell
  profiles and modules in your environment
• Company-specific module and script
  repository
• Redirected Documents-folder and default
  PowerShell profile for admins
Corporate Powershell Module Repository by PowerShell MVP Tome Tanasovski:
http://powertoe.wordpress.com/2010/08/10/corporate-powershell-module-repository-part-1-design-and-
infrastructure
Call to action
If not already using PowerShell, start using it
 (quickest way to start: stop using cmd.exe)
Use the PowerShell community to Get-Help
Resources
     TechNet Wiki

Windows PowerShell Survival Guide
http://social.technet.microsoft.com/wiki/contents/articles/windows-powershell-survival-guide.aspx

     Articles

James O`Neill - best practices:
http://jamesone111.wordpress.com/2011/10/24/maximize-the-reuse-of-your-powershell/

Jeff Hicks - turn CLI tools into PowerShell:
http://jdhitsolutions.com/blog/2011/10/turning-cli-tools-into-powershell-tools-deep-dive-demos

Windows PowerShell: Scripting Crash Course:
http://technet.microsoft.com/nb-no/magazine/hh551144(en-us).aspx
Microsoft Technology User Group Script Club


 Part of the Microsoft Technology User Group in Oslo
 Regular workshops exploring various topics around
  automation and scripting with a focus on PowerShell.
  Meetings is announced at www.mtug.no
 If you want to find or create a PowerShell usergroup or script
  club, check out http://powershellgroup.org
Contact info
New-Object PSObject -Property @{

Name = "Jan Egil Ring"
"E-mail" = "jan.egil.ring@crayon.com"
TwitterId = "@JanEgilRing"
Website = "blog.powershell.no"

}

Contenu connexe

En vedette

Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2
Leslie Creath
 
Map skills millionaire unit 1 review
Map skills millionaire   unit 1 reviewMap skills millionaire   unit 1 review
Map skills millionaire unit 1 review
Leslie Creath
 
Introduction to Core 4
Introduction to Core 4Introduction to Core 4
Introduction to Core 4
simonjj
 
Kotter change 8 step
Kotter change 8 stepKotter change 8 step
Kotter change 8 step
ydelph
 
Jeopardy africa review
Jeopardy africa reviewJeopardy africa review
Jeopardy africa review
Leslie Creath
 
English language arts standards
English language arts standardsEnglish language arts standards
English language arts standards
Sheryl McGuire
 
Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2
Leslie Creath
 
November 26 30 central america & panama canal 2
November 26 30 central america & panama canal 2November 26 30 central america & panama canal 2
November 26 30 central america & panama canal 2
Leslie Creath
 
CREAREA UNUI BLOG
CREAREA UNUI BLOGCREAREA UNUI BLOG
CREAREA UNUI BLOG
kkisslaci
 
New zealand powerpoint
New zealand powerpointNew zealand powerpoint
New zealand powerpoint
Leslie Creath
 
Common grammar mistakes
Common grammar mistakesCommon grammar mistakes
Common grammar mistakes
Holly Blevins
 

En vedette (19)

Begrijp De Status Van Wma
Begrijp De Status Van WmaBegrijp De Status Van Wma
Begrijp De Status Van Wma
 
Visual resume
Visual resumeVisual resume
Visual resume
 
Cook_Scott_PPP
Cook_Scott_PPPCook_Scott_PPP
Cook_Scott_PPP
 
Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2
 
Map skills millionaire unit 1 review
Map skills millionaire   unit 1 reviewMap skills millionaire   unit 1 review
Map skills millionaire unit 1 review
 
Introduction to Core 4
Introduction to Core 4Introduction to Core 4
Introduction to Core 4
 
An Introduction to Core 4
An Introduction to Core 4An Introduction to Core 4
An Introduction to Core 4
 
Kotter change 8 step
Kotter change 8 stepKotter change 8 step
Kotter change 8 step
 
Jeopardy africa review
Jeopardy africa reviewJeopardy africa review
Jeopardy africa review
 
English language arts standards
English language arts standardsEnglish language arts standards
English language arts standards
 
Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2
 
November 26 30 central america & panama canal 2
November 26 30 central america & panama canal 2November 26 30 central america & panama canal 2
November 26 30 central america & panama canal 2
 
CREAREA UNUI BLOG
CREAREA UNUI BLOGCREAREA UNUI BLOG
CREAREA UNUI BLOG
 
New zealand powerpoint
New zealand powerpointNew zealand powerpoint
New zealand powerpoint
 
Zenoss & Cloud
Zenoss & CloudZenoss & Cloud
Zenoss & Cloud
 
Common grammar mistakes
Common grammar mistakesCommon grammar mistakes
Common grammar mistakes
 
Rise & Fall of The Berlin Wall
Rise & Fall of The Berlin WallRise & Fall of The Berlin Wall
Rise & Fall of The Berlin Wall
 
Moral tahun 2
Moral tahun 2Moral tahun 2
Moral tahun 2
 
5 basic passing_and_cooperation
5 basic passing_and_cooperation5 basic passing_and_cooperation
5 basic passing_and_cooperation
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
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, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Practical PowerShell for the Windows Administrator

  • 1. Practical PowerShell for the Windows Administrator Jan Egil Ring Senior Consultant, Infrastructure jan.egil.ring@crayon.com
  • 2. Agenda • Specific scenarios • System Center Virtual Machine Manager • Hyper-V • DNS • DHCP • Profile- and module-management January 22, 2012 NIC 2012
  • 3. Hyper-V Administration using System Center Virtual Machine Manager • Manage Hyper-V, VMware and XenServer • Built on top of PowerShell • Makes it easy to do bulk management, generate reports and so on. • Automate baselines, best practices and tuning • Demo: Generate reports of your virtual infrastructure and VM bulk-provisioning Recommended TechEd-video, Failover Clustering & Hyper-V : http://channel9.msdn.com/Events/TechEd/Europe/2010/WSV403
  • 4. Hyper-V administration using PowerShell • Hyper-V PowerShell-module in Windows 8 (both client and server) with ~150 cmdlets • No PowerShell-module for managing Hyper-V in Windows Server 2008/2008 R2 from Microsoft • Community module from James O`Neill (pshyperv.codeplex.com)
  • 5. DNS • Real world example: The domain is being upgraded to the latest version, and there has been made a decision not to re-use any IP addresses for the DNS servers • Mission: Change DNS server settings on all servers in the domain • Possible solution: Get/Set-DNSServerSearchOrder PowerShell Network Adapter Configuration Module by Jan Egil Ring: http://psnetadapterconfig.codeplex.com
  • 6. DHCP administration using PowerShell • Builtin PowerShell module in Windows Server 8 • Wrapper-module around netsh available for downlevel server OS • Demo: Bulk-create over 200 DHCP-scopes PowerShell Module for DHCP by Jeremy Engel: http://bit.ly/gxMLJJ
  • 7. • Back to the SC VMM demo
  • 8. Profile- and module-management • Design how you will manage PowerShell profiles and modules in your environment • Company-specific module and script repository • Redirected Documents-folder and default PowerShell profile for admins Corporate Powershell Module Repository by PowerShell MVP Tome Tanasovski: http://powertoe.wordpress.com/2010/08/10/corporate-powershell-module-repository-part-1-design-and- infrastructure
  • 9. Call to action If not already using PowerShell, start using it (quickest way to start: stop using cmd.exe) Use the PowerShell community to Get-Help
  • 10. Resources  TechNet Wiki Windows PowerShell Survival Guide http://social.technet.microsoft.com/wiki/contents/articles/windows-powershell-survival-guide.aspx  Articles James O`Neill - best practices: http://jamesone111.wordpress.com/2011/10/24/maximize-the-reuse-of-your-powershell/ Jeff Hicks - turn CLI tools into PowerShell: http://jdhitsolutions.com/blog/2011/10/turning-cli-tools-into-powershell-tools-deep-dive-demos Windows PowerShell: Scripting Crash Course: http://technet.microsoft.com/nb-no/magazine/hh551144(en-us).aspx
  • 11. Microsoft Technology User Group Script Club  Part of the Microsoft Technology User Group in Oslo  Regular workshops exploring various topics around automation and scripting with a focus on PowerShell. Meetings is announced at www.mtug.no  If you want to find or create a PowerShell usergroup or script club, check out http://powershellgroup.org
  • 12. Contact info New-Object PSObject -Property @{ Name = "Jan Egil Ring" "E-mail" = "jan.egil.ring@crayon.com" TwitterId = "@JanEgilRing" Website = "blog.powershell.no" }

Notes de l'éditeur

  1. Fordelen med å benytte prestaging er at vi får de fordelene utrulling via SCCM gir (gjøre hva som helst i tasksequence) og det blir en dynamisk løsning (enkelte å legge til f.eks. installasjon av en agent eller annen software kun ved å legge til dette i SCCM).Årsaken til å måtte prestage MAC-adresse er for å unngå å aktivere Unknown computer support i SCCM (noe som utgjør en sikkerhetsrisiko, og som ikke er best practice), i tillegg får vi dyttet maskina i riktig Collection slik at OS-utrulling kan gjøres med Zero-Touch.