Blog Post

Ask The Performance Team
2 MIN READ

APP: Windows Powershell (Basic Commands)

CraigMarcho's avatar
CraigMarcho
Icon for Microsoft rankMicrosoft
Mar 16, 2019
First published on TECHNET on Apr 09, 2009


WINDOWS POWERSHELL (BASIC COMMANDS)




Description: Windows PowerShell is a command line shell and scripting language that helps IT professionals achieve greater control and productivity in their environment.  Using an admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.  Windows PowerShell is easy to adopt, learn, and use, because it works with your existing IT infrastructure and existing script investments.  PowerShell works on Windows XP, Windows 2003, Windows Vista, Windows 2008 and Windows 7.




Scoping the Issue: First, PowerShell needs to be downloaded and installed on your OS.  If you are running Windows Server 2008, or Windows 7 then PowerShell is already included with the Operating System.  To install PowerShell on other supported operating systems, please follow this link below: How to Download Windows PowerShell 1.0 .


Once PowerShell is installed, the following basic commands can be used to gather data:



  • Get-help - displays help about PowerShell cmdlets and concepts

  • Get-process – gets the processes that are running on the local computer

  • Stop-process - stops one or more running processes

  • Get-service – gets the services on the local computer

  • Start-service – starts one or more stopped services

  • Stop-service – stops one or more running services

  • Get-eventlog – gets information about local event logs or the entries stored in those event logs

  • Get-wmiobject <classname> - gets instances of WMI classes or information about available classes

These commands represent a fraction of the native PowerShell commands.



Data Gathering: In all instances, collecting either MPS Reports with the General, Internet and Networking, Business Networks and Server Components diagnostics, or a Performance-oriented MSDT manifest must be done.  PowerShell records any errors to the Event Logs with an Event Source of PowerShell.




Additional Resources:


Updated Mar 16, 2019
Version 2.0
No CommentsBe the first to comment