SlideShare a Scribd company logo
1 of 23
Windows PowerShell
Introduction to Network Configuration and Troubleshooting using
PowerShell
Introduction
• PowerShell is a command-line shell and scripting language that seeks to help admins configure systems and automate
tasks.
• The object-oriented technology is built on Microsoft's .NET framework.
• As such, it lets IT personnel work with objects in contrast with text-based shells.
• Windows PowerShell has revolutionized the Windows command line.
• From configuration management to software installation to scripting, PowerShell is one of the most
powerful tools in any Windows administrator's toolbox.
• And PowerShell is also useful for managing Windows network settings and services.
What is PowerShell used for?
• PowerShell, in its role as command-line shell, serves as the replacement for Microsoft's Command
Prompt, which goes back to the days of DOS.
• Microsoft made PowerShell the default command-line interface (CLI) for Windows 10 as of build
14791. Most users first interact with PowerShell in its command-line capacity.
• The key use case for PowerShell is automating various administrative activities.
• Examples include navigating registries, identifying processes using the most memory and
stopping/restarting a particular service.
• PowerShell can also obtain model information on a computer and extract information on OSes,
such as the specific version and service pack levels.
• In addition, admins can use PowerShell to run commands and scripts on one or more remote
computers, using protocols such as WS-Management and, more recently, Secure Shell (SSH).
• PowerShell is used in IT departments to automate formerly manual tasks, with the objective of
boosting efficiency.
• Third-party IT services firms, such as managed service providers (MSPs), also use PowerShell.
• MSPs tap PowerShell to automate such tasks as software deployment, software integration
and report generation.
• Service providers also create PowerShell scripts to periodically check on whether customers
have required software installed and to automate the process of creating a new user account.
Powershell commands - Cmdlets
• Cmdlets are the foundational component of PowerShell automation. A cmdlet performs a
single function and returns a .NET object.
• Cmdlets are typically structured in a verb-noun format.
• One or more parameters can be added to a cmdlet to make the command more specific --
directing a cmdlet to install a particular version of a software product, for example.
• Ready-made cmdlets abound, and admins can learn about them through help content, which
describes the cmdlet and its parameters.
• Admins can create their own cmdlets using PowerShell script or C#.
• All told, thousands of cmdlets exist across PowerShell and public and private repositories.
Examples
• Here are some of the basic cmdlets included in PowerShell.
Cmdlets vs. commands
• Cmdlets attempt to make it clear to the user what action they perform. That's in contrast to
the sometimes truncated and cryptic command statements used in other shells.
• Joey Aiello, senior program manager, PowerShell, at Microsoft, said PowerShell's "very verbose
syntax" simplifies matters for people who aren't as familiar with the shorter command names
used in shells such as CMD and BASH.
• On the other hand, PowerShell supports aliases for admins that are accustomed to using
shorter commands.
PowerShell Cmdlets
• We will discuss PowerShell cmdlets for network troubleshooting.
• The first group of cmdlets deals with displaying network information so admins can confirm
it is correct.
• The second group covers name resolution, and
• the final set looks at managing network services with PowerShell.
• The basic PowerShell syntax is verb-noun followed by possible parameters.
• For example,
• Get-Date displays the system's current date and time.
• Here are a few PowerShell tricks to remember:
• PowerShell cmdlets are not case-sensitive.
• Use the Format-Table cmdlet to organize output.
• Use the Up arrow key to browse recent commands.
• Use the Tab key after verbs to see what nouns are available -- many options are available.
• Use the Tab key after a parameter dash (-) to see the available parameters.
• Use the Tab key after a parameter to see the valid parameter values.
Get-NetIPAddress
• view IP address settings
• Frequently, the first step in troubleshooting a network problem is confirming the host's IP
address configuration.
• While many admins use ipconfig to display this information, the Get-NetIPAddress cmdlet
serves the same purpose.
Get-NetIPConfiguration
• display IP address details
• Another option is to use the Get-NetIPConfiguration cmdlet to display details about the IP
address settings. One major feature of this cmdlet is its ability to provide more focused
information. Depending on the parameters admins include, the output displays information
for specific interfaces and at varying levels of detail.
Get-NetAdapter
• display network interface settings
• It can be helpful to display specific information about the network card itself rather than the
logical addressing associated with it. Use the Get-NetAdapter cmdlet to see the interface's
attributes, including name, description, interface index, status, media access control address
and link speed.
Enable-NetAdapter and Disable-NetAdapter
• up and down an interface
• Admins may discover another admin has downed a network interface, or perhaps someone
configured the interface as a failover and kept it in the down state. They can use the Enable-
NetAdapter cmdlet to reenable -- or up -- an interface. Downing the interface relies on the
Disable-NetAdapter cmdlet.
Get-NetRoute
• show the routing table
• If admins are confident the system's IP address settings are correct and the network interface
is responsive, they may need to confirm the routing table.
• Rather than using the older route command, try the Get-NetRoute cmdlet instead.
Test-Connection and Test-NetConnection
• test connectivity
• Ping is probably the most ubiquitous network troubleshooting tool.
• PowerShell has its own cmdlet for ping: Test-Connection.
• The syntax and responses are similar to the more generic tool.
Get-NetTCPConnection
• test existing connections to server
• Another connectivity check is viewing existing connections to the server.
• Do this with the Get-NetTCPConnection cmdlet, which replaces the netstat command.
• The output from this command may be long depending on the current connections to the
system and the network services running on it.
• One way to narrow the scope of the results is to request current connections by a specific port
number.
• For example, perhaps admins are interested in results on port 135/TCP. In that case, they can
use the -LocalPort parameter, as seen below.
• PS>Get-NetTCPConnection –LocalPort 135
Resolve-DnsName
• confirm name resolution works
• Begin by attempting to resolve an IP address manually with the Resolve-DnsName cmdlet. This
cmdlet may replace or supplement nslookup in an admin's toolbox.
• PS> Resolve-DnsName google.com
Get-DnsClient
• check DNS client status
• Next, check the status of the DNS client software on the local machine. The Get-DnsClient
cmdlet provides this information, as seen below.
Get-DnsClientCache and Clear-DnsClientCache
• view and clear DNS cache
• When troubleshooting client-side name resolution problems, it's often useful to clear the DNS
cache. While the cache normally makes the name resolution process more efficient, it can
potentially store incorrect or outdated information, causing name resolution to fail or return
false results. Admins often use ipconfig /flushdns to do this, along with ipconfig /displaydns to
view the cache.
Get-DnsClientServerAddress
• display configured DNS servers
• Client computers may attempt to resolve names against invalid DNS servers. Display the
configured DNS servers for a client by using the Get-DnsClientServerAddress cmdlet, as seen
below.
Get-Service
• check service status
• Identify services either by service name or display name. A parameter exists for both options.
For example, check the status of a service by using the Get-Service -Name DhcpServer or Get-
Service -DisplayName "DHCP Server" cmdlet, as shown below.
• PS> Get-Service –Name DhcpServer
Name DisplayName
dhcp DHCP Client
DNS DNS Server
DnsCache DNS Client
TermService Remote Desktop Services
ssh-agent OpenSSH Authentication Agent
Restart-Service
• restart a service
• Restarting a service uses a similar cmdlet and syntax. For example, to restart the DHCP server
service, use the Restart-Service cmdlet with the -Name parameter.

More Related Content

Similar to Windows PowerShell.pptx

Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedAcquia
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Michael Dobe, Ph.D.
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web DevelopmentEric Greene
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsLetsConnect
 
Troubleshooting a XenDesktop Environment using the PowerShell SDK
Troubleshooting a XenDesktop Environment using the PowerShell SDKTroubleshooting a XenDesktop Environment using the PowerShell SDK
Troubleshooting a XenDesktop Environment using the PowerShell SDKDavid McGeough
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewRichard Giles
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0Sarah Dutkiewicz
 
KACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewKACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewDell World
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMathew Beane
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Antonios Chatzipavlis
 
8 power shell commands every windows administrator should know
8 power shell commands every windows administrator should know8 power shell commands every windows administrator should know
8 power shell commands every windows administrator should knowDana Pardaz Co.
 
11g Identity Management - InSync10
11g Identity Management - InSync1011g Identity Management - InSync10
11g Identity Management - InSync10Peter McLarty
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp adminsRick Taylor
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBUniFabric
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magentoMathew Beane
 

Similar to Windows PowerShell.pptx (20)

Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with Memcached
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
Demystifying puppet
Demystifying puppetDemystifying puppet
Demystifying puppet
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
Troubleshooting a XenDesktop Environment using the PowerShell SDK
Troubleshooting a XenDesktop Environment using the PowerShell SDKTroubleshooting a XenDesktop Environment using the PowerShell SDK
Troubleshooting a XenDesktop Environment using the PowerShell SDK
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 
KACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewKACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting Overview
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
8 power shell commands every windows administrator should know
8 power shell commands every windows administrator should know8 power shell commands every windows administrator should know
8 power shell commands every windows administrator should know
 
11g Identity Management - InSync10
11g Identity Management - InSync1011g Identity Management - InSync10
11g Identity Management - InSync10
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp admins
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DB
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magento
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Windows PowerShell.pptx

  • 1. Windows PowerShell Introduction to Network Configuration and Troubleshooting using PowerShell
  • 2. Introduction • PowerShell is a command-line shell and scripting language that seeks to help admins configure systems and automate tasks. • The object-oriented technology is built on Microsoft's .NET framework. • As such, it lets IT personnel work with objects in contrast with text-based shells. • Windows PowerShell has revolutionized the Windows command line. • From configuration management to software installation to scripting, PowerShell is one of the most powerful tools in any Windows administrator's toolbox. • And PowerShell is also useful for managing Windows network settings and services.
  • 3. What is PowerShell used for? • PowerShell, in its role as command-line shell, serves as the replacement for Microsoft's Command Prompt, which goes back to the days of DOS. • Microsoft made PowerShell the default command-line interface (CLI) for Windows 10 as of build 14791. Most users first interact with PowerShell in its command-line capacity. • The key use case for PowerShell is automating various administrative activities. • Examples include navigating registries, identifying processes using the most memory and stopping/restarting a particular service. • PowerShell can also obtain model information on a computer and extract information on OSes, such as the specific version and service pack levels. • In addition, admins can use PowerShell to run commands and scripts on one or more remote computers, using protocols such as WS-Management and, more recently, Secure Shell (SSH).
  • 4. • PowerShell is used in IT departments to automate formerly manual tasks, with the objective of boosting efficiency. • Third-party IT services firms, such as managed service providers (MSPs), also use PowerShell. • MSPs tap PowerShell to automate such tasks as software deployment, software integration and report generation. • Service providers also create PowerShell scripts to periodically check on whether customers have required software installed and to automate the process of creating a new user account.
  • 5. Powershell commands - Cmdlets • Cmdlets are the foundational component of PowerShell automation. A cmdlet performs a single function and returns a .NET object. • Cmdlets are typically structured in a verb-noun format. • One or more parameters can be added to a cmdlet to make the command more specific -- directing a cmdlet to install a particular version of a software product, for example. • Ready-made cmdlets abound, and admins can learn about them through help content, which describes the cmdlet and its parameters. • Admins can create their own cmdlets using PowerShell script or C#. • All told, thousands of cmdlets exist across PowerShell and public and private repositories.
  • 6. Examples • Here are some of the basic cmdlets included in PowerShell.
  • 7. Cmdlets vs. commands • Cmdlets attempt to make it clear to the user what action they perform. That's in contrast to the sometimes truncated and cryptic command statements used in other shells. • Joey Aiello, senior program manager, PowerShell, at Microsoft, said PowerShell's "very verbose syntax" simplifies matters for people who aren't as familiar with the shorter command names used in shells such as CMD and BASH. • On the other hand, PowerShell supports aliases for admins that are accustomed to using shorter commands.
  • 8. PowerShell Cmdlets • We will discuss PowerShell cmdlets for network troubleshooting. • The first group of cmdlets deals with displaying network information so admins can confirm it is correct. • The second group covers name resolution, and • the final set looks at managing network services with PowerShell.
  • 9. • The basic PowerShell syntax is verb-noun followed by possible parameters. • For example, • Get-Date displays the system's current date and time.
  • 10. • Here are a few PowerShell tricks to remember: • PowerShell cmdlets are not case-sensitive. • Use the Format-Table cmdlet to organize output. • Use the Up arrow key to browse recent commands. • Use the Tab key after verbs to see what nouns are available -- many options are available. • Use the Tab key after a parameter dash (-) to see the available parameters. • Use the Tab key after a parameter to see the valid parameter values.
  • 11. Get-NetIPAddress • view IP address settings • Frequently, the first step in troubleshooting a network problem is confirming the host's IP address configuration. • While many admins use ipconfig to display this information, the Get-NetIPAddress cmdlet serves the same purpose.
  • 12. Get-NetIPConfiguration • display IP address details • Another option is to use the Get-NetIPConfiguration cmdlet to display details about the IP address settings. One major feature of this cmdlet is its ability to provide more focused information. Depending on the parameters admins include, the output displays information for specific interfaces and at varying levels of detail.
  • 13. Get-NetAdapter • display network interface settings • It can be helpful to display specific information about the network card itself rather than the logical addressing associated with it. Use the Get-NetAdapter cmdlet to see the interface's attributes, including name, description, interface index, status, media access control address and link speed.
  • 14. Enable-NetAdapter and Disable-NetAdapter • up and down an interface • Admins may discover another admin has downed a network interface, or perhaps someone configured the interface as a failover and kept it in the down state. They can use the Enable- NetAdapter cmdlet to reenable -- or up -- an interface. Downing the interface relies on the Disable-NetAdapter cmdlet.
  • 15. Get-NetRoute • show the routing table • If admins are confident the system's IP address settings are correct and the network interface is responsive, they may need to confirm the routing table. • Rather than using the older route command, try the Get-NetRoute cmdlet instead.
  • 16. Test-Connection and Test-NetConnection • test connectivity • Ping is probably the most ubiquitous network troubleshooting tool. • PowerShell has its own cmdlet for ping: Test-Connection. • The syntax and responses are similar to the more generic tool.
  • 17. Get-NetTCPConnection • test existing connections to server • Another connectivity check is viewing existing connections to the server. • Do this with the Get-NetTCPConnection cmdlet, which replaces the netstat command. • The output from this command may be long depending on the current connections to the system and the network services running on it. • One way to narrow the scope of the results is to request current connections by a specific port number. • For example, perhaps admins are interested in results on port 135/TCP. In that case, they can use the -LocalPort parameter, as seen below. • PS>Get-NetTCPConnection –LocalPort 135
  • 18. Resolve-DnsName • confirm name resolution works • Begin by attempting to resolve an IP address manually with the Resolve-DnsName cmdlet. This cmdlet may replace or supplement nslookup in an admin's toolbox. • PS> Resolve-DnsName google.com
  • 19. Get-DnsClient • check DNS client status • Next, check the status of the DNS client software on the local machine. The Get-DnsClient cmdlet provides this information, as seen below.
  • 20. Get-DnsClientCache and Clear-DnsClientCache • view and clear DNS cache • When troubleshooting client-side name resolution problems, it's often useful to clear the DNS cache. While the cache normally makes the name resolution process more efficient, it can potentially store incorrect or outdated information, causing name resolution to fail or return false results. Admins often use ipconfig /flushdns to do this, along with ipconfig /displaydns to view the cache.
  • 21. Get-DnsClientServerAddress • display configured DNS servers • Client computers may attempt to resolve names against invalid DNS servers. Display the configured DNS servers for a client by using the Get-DnsClientServerAddress cmdlet, as seen below.
  • 22. Get-Service • check service status • Identify services either by service name or display name. A parameter exists for both options. For example, check the status of a service by using the Get-Service -Name DhcpServer or Get- Service -DisplayName "DHCP Server" cmdlet, as shown below. • PS> Get-Service –Name DhcpServer Name DisplayName dhcp DHCP Client DNS DNS Server DnsCache DNS Client TermService Remote Desktop Services ssh-agent OpenSSH Authentication Agent
  • 23. Restart-Service • restart a service • Restarting a service uses a similar cmdlet and syntax. For example, to restart the DHCP server service, use the Restart-Service cmdlet with the -Name parameter.