Welcome to this PowerShell tutorial, here you'll learn to make your own PowerShell scripts, If you're brand new to PowerShell then you are at right place to start learning PowerShell scripting.

Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.

PowerShell has power, depth and flexibility and you can research for yourself, with PowerShell you can create new objects for example, Windows Services File system , DirectoryEntry or the simpler, and .Net Framework based object using fully qualified name like system.DateTime.

PowerShell has ability to use .Net Framework and powershell allows you to build such objects.


Microsoft just kept adding more and more new PowerShell methods to make our life as easy as possible.

Output is always a .NET Object Please, Remember that PowerShell output is always a .NET object. That output could be a System.Diagnostics.Process a object or System.IO.FileInfo object or a System.String object. Basically it could be any .NET object whose assembly is loaded into PowerShell including your own .NET objects.
An Absolute Beginner's Baby steps In PowerShell you can find here.

Powershell 1.0, Powershell 2.0, Powershell 3.0

and Powershell 4.0

Now Powershell 5.0

What's New in Windows PowerShell 5.0 Windows PowerShell 5.0 includes significant new features that extend its use, improve its usability, and allow you to control and manage Windows-based environments more easily and comprehensively.

  • Contains updates for Windows PowerShell and Windows PowerShell ISE.
  • Package Management cmdlets.
  • Network Switch cmdlets.
  • Windows PowerShell Desired State Configuration (DSC)

note: You will need .NET Framework 4.5.

Example

# Windows PowerShell Version Check
Clear-Host
$Host

Copy and Try it

Please, Have a look at the Table of contents to the left, where all the menu items are listed and be sure to come back regularly, as we will be keep adding new sections to it. We hope that this tutorial will get you started properly on Powershell.

Everything here is free, and We hope you like our work.


When you run any get command, you can see some of the properties(Not All Poperties).
It is powershell configuration which shows only configured properties cloumn.
We are coming with massive update on 'Get-Member' in Language Section..

How to use powershell commands effectively one of the important to get help or find different commands.
Find commands starting with 'a'

Example

PS>get-help a*

Copy and Try it


Find commands starting with 'b'

Example

PS>get-help b*

Copy and Try it

We will see one of the example where we can get the collection and query or filter or sort collection.
e.g

Example

get-service | where { $_.Status -eq "running"} | select-object -last 10

Copy and Try it



Lets consider above example "get-service" is a collection of services.
"|" use to query the collection
inside where "$_" collection variable like we have in LINQ (C#). Here query to find running services out of the collection
Finally we are taking that filtered collection (running services) taking only last 10 items (services)


Please download Powershell Essentials from below link
Powershell Essentials Powershelltutorial.pdf
RECENT UPDATES
Powershell Sleep
If you need to pause your PowerShell Script, you can add this command to your
script and force it to wait couple seconds (Milliseconds) powershell sleep read more..
  1. powershell Script Signing
  2. Powershell Sql Backup
  3. Powershell Sql Backup Restore
  4. Powershell Snapins
  5. Powershell Delete File
  6. How can i run powershell with the net 4 runtime
  7. How do you comment out code in powershell
  8. How many cmdlets Available in powershell
  9. How to determine what version of powershell is installed
  10. How to execute powershell script from c# commandline arguments
  11. How to load assemblies in powershell
  12. How to pass multiple parameters into a function in powershell
  13. Is it possible to create Multidimensional Arrays in Powershell
  14. Is it possible to run commands in parallel powershell
  15. What is cmdlets and its terms in powershell
  16. powershell Script Signing
  17. Powershell Sql Backup
  18. Powershell Sql Backup Restore
  19. Powershell Snapins
  20. Powershell Delete File
  21. How can i run powershell with the net 4 runtime
  22. How do you comment out code in powershell
  23. How many cmdlets Available in powershell
  24. How to determine what version of powershell is installed
  25. How to execute powershell script from c# commandline arguments
  26. How to load assemblies in powershell
  27. How to pass multiple parameters into a function in powershell
  28. Is it possible to create Multidimensional Arrays in Powershell
  29. Is it possible to run commands in parallel powershell
  30. What is cmdlets and its terms in powershell
  31. Accessing the alias drive in powershell 3
  32. Adding functions to the powershell ise menu
  33. Basic line editing tricks powershell
  34. Breaking down a powershell script
  35. Casting values in powershell
  36. Changing powershells look and feel
  37. Constant and read only variables
  38. Create xml variable powershell
  39. Creating aliases in powershell
  40. Creating and changing a powershell profile
  41. Creating persistent aliases in powershell
  42. Customizing-the-ise-in-powershell
  43. Download-file-website-powershell
  44. Getting-acquainted-with-the-ise
  45. Getting-the-right-output-in-powershell
  46. Getting-to-know-tab-expansion
  47. Growing-arrays-dynamically-in-powershell
  48. Handling-complex-powershell-scripts
  49. Hashtables-in-windows-powershell
  50. How-to-impersonate-someone-in-powershell
  51. How-to-use-powershells-invoke-wmimethod
  52. installing-windows-powershell-2
  53. query-xml-data-powershell
  54. Stringing-powershell-commands-together-2
  55. Understanding-automatic-variables-in-powershell
  56. Understanding-if-else-statements-in-powershell
  57. Understanding-powershell-commands
  58. Understanding-powershell-operators
  59. Understanding-powershell-variables-and-datatypes
  60. Understanding-the-windows-management-instrumentation-wmi-part-ii
  61. Understanding-the-windows-management-instrumentation-wmi
  62. Using-loops-in-powershell-part-i
  63. Using-loops-in-powershell-part-ii
  64. Using-loops-in-powershell-part-iii
  65. Using-loops-in-powershell-part-iv
  66. Using-loops-in-powershell-part-v
  67. Using-pipelines-to-streamline-powershell-commands
  68. Using-regular-expressions-in-powershell-part-i
  69. Using-the-switch-statement-in-powershell
  70. Working-binary-powershell
  71. Working-with-powershell-objects-via-variables
  72. Writing-your-first-powershell-command
  73. How to read a secure channel
  74. Managing ACLs
  75. Creating cmdlets in C#
  76. Object is a collection
  77. Conversion dates WMI size
  78. why to set up your own nuget private gallery
  79. PowerShell and Bing
  80. SSIS Deployment
  81. Merge and Package
  82. Delete Bin Obj in current folder
  83. load assembly from path in powershell
  84. How to show message box from powershell
  85. bypass executionPolicy
  86. Copy files specific extension

Windows PowerShell includes the following features:

  • Cmdlets for performing common system administration tasks, such as managing the registry, services, processes, and event logs, and using Windows Management Instrumentation (WMI).
  • A task-based scripting language and support for existing scripts and command-line tools.
  • Consistent design. Because cmdlets and system data stores use common syntax and naming conventions, data can be shared easily and the output from one cmdlet can be used as the input to another cmdlet without reformatting or manipulation.
  • Simplified, command-based navigation of the operating system, which lets users navigate the registry and other data stores by using the same techniques that they use to navigate the file system.
  • Powerful object manipulation capabilities. Objects can be directly manipulated or sent to other tools or databases.
  • Extensible interface. Independent software vendors and enterprise developers can build custom tools and utilities to administer their software.