SlideShare uma empresa Scribd logo
1 de 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"

}

Mais conteúdo relacionado

Destaque

Begrijp De Status Van Wma
Begrijp De Status Van WmaBegrijp De Status Van Wma
Begrijp De Status Van Wmaavandewall
 
Visual resume
Visual resumeVisual resume
Visual resumeadhump2
 
Cook_Scott_PPP
Cook_Scott_PPPCook_Scott_PPP
Cook_Scott_PPPScott Cook
 
Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2Leslie Creath
 
Map skills millionaire unit 1 review
Map skills millionaire   unit 1 reviewMap skills millionaire   unit 1 review
Map skills millionaire unit 1 reviewLeslie Creath
 
Introduction to Core 4
Introduction to Core 4Introduction to Core 4
Introduction to Core 4simonjj
 
An Introduction to Core 4
An Introduction to Core 4An Introduction to Core 4
An Introduction to Core 4simonjj
 
Kotter change 8 step
Kotter change 8 stepKotter change 8 step
Kotter change 8 stepydelph
 
Jeopardy africa review
Jeopardy africa reviewJeopardy africa review
Jeopardy africa reviewLeslie Creath
 
English language arts standards
English language arts standardsEnglish language arts standards
English language arts standardsSheryl McGuire
 
Landform review week 2
Landform review week 2Landform review week 2
Landform review week 2Leslie 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 2Leslie Creath
 
CREAREA UNUI BLOG
CREAREA UNUI BLOGCREAREA UNUI BLOG
CREAREA UNUI BLOGkkisslaci
 
New zealand powerpoint
New zealand powerpointNew zealand powerpoint
New zealand powerpointLeslie Creath
 
Zenoss & Cloud
Zenoss & CloudZenoss & Cloud
Zenoss & Cloudsimonjj
 
Common grammar mistakes
Common grammar mistakesCommon grammar mistakes
Common grammar mistakesHolly Blevins
 
Rise & Fall of The Berlin Wall
Rise & Fall of The Berlin WallRise & Fall of The Berlin Wall
Rise & Fall of The Berlin WallLeslie Creath
 
5 basic passing_and_cooperation
5 basic passing_and_cooperation5 basic passing_and_cooperation
5 basic passing_and_cooperationWan Rizuan
 

Destaque (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
 

Último

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

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

Notas do Editor

  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.