SlideShare ist ein Scribd-Unternehmen logo
1 von 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"

}

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

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...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
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...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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, ...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

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" }

Hinweis der Redaktion

  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.