EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials PowerShell Tutorial Get Help in PowerShell
Secondary Sidebar
PowerShell Tutorial
  • cmdlet
    • PowerShell Wait
    • PowerShell Match
    • cmdlets in PowerShell
    • Start PowerShell from cmd
    • Add-Content in PowerShell
    • Get Help in PowerShell
    • PowerShell Copy-Item
    • PowerShell Remove-Item
    • PowerShell Move-Item
    • Get Command in PowerShell
    • PowerShell Run Command
    • Windows PowerShell ISE
    • Windows Powershell Commands
    • WinRM PowerShell
    • PowerShell Date
    • Powershell Write-Host
    • PowerShell Get-ChildItem
    • PowerShell Sort-Object
    • PowerShell Where Object
    • PowerShell Set-Content
    • PowerShell Set-Location
    • PowerShell Invoke-Command
    • PowerShell Invoke-Webrequest
    • PowerShell Get-Location
    • PowerShell Get-Date
    • PowerShell Get-Service
    • PowerShell Test-Path
    • Powershell Module Path
    • PowerShell Out-File
    • PowerShell if File Exists
    • Powershell Copy File
    • PowerShell Delete File
    • PowerShell New-Item
    • PowerShell Rename-Item
    • PowerShell ComputerName
    • PowerShell Get-Content
    • PowerShell Get-Item
    • PowerShell Get-ADUser
    • PowerShell Grep
    • PowerShell Concatenate String
    • PowerShell Get-Process
    • PowerShell Count
    • PowerShell pause
  • Basics
    • PowerShell Restart Service
    • PowerShell comment
    • PowerShell Map Network Drive
    • PowerShell Append to File
    • PowerShell print
    • What is PowerShell
    • Uses Of Powershell
    • PowerShell Empire
    • PowerShell Parameter
    • PowerShell Stop Service
    • PowerShell Versions
    • How To Install PowerShell
    • PowerShell uninstall module
    • How to Use PowerShell?
    • PowerShell Logging
    • PowerShell Tools
    • PowerShell Commands
    • PowerShell Version Command
    • PowerShell Administrator
    • PowerShell Modules
    • PowerShell Registry
    • PowerShell block Comment
    • PowerShell Verbs
    • PowerShell list
    • PowerShell add user to group
    • PowerShell Write to Console
    • Variable in PowerShell
    • PowerShell New Line
    • PowerShell prompt for input
    • PowerShell File Extension
    • Powershell Remotesigned
    • PowerShell Write to File
    • PowerShell Ping
    • PowerShell wget
    • PowerShell Global variable
    • PowerShell Get-ADGroup
    • Array in PowerShell
    • PowerShell Multidimensional Array
    • PowerShell Array of Strings
    • PowerShell? join array
    • Useful PowerShell Scripts
    • String in PowerShell
    • PowerShell Switch Statement
    • PowerShell Function Parameters
    • PowerShell vs PowerShell ISE
    • PowerShell test-connection
    • PowerShell Test-NetConnection
    • PowerShell GUI
    • PowerShell Variable in String
    • PowerShell Active Directory
  • Variables
    • PowerShell Variables
    • PowerShell Environment Variables
    • PowerShell set environment variable
    • Hashtable in PowerShell
    • Set Variable in PowerShell
  • Operators
    • PowerShell Operators
    • Comparison Operators in PowerShell
    • Logical Operators in PowerShell
    • PowerShell Boolean
    • PowerShell Like Operator
  • Control Statements
    • If Statement in PowerShell
    • If Else in PowerShell
    • Else If in PowerShell
    • Loops in PowerShell
    • For loop in PowerShell
    • PowerShell While Loop
    • PowerShell do while
    • PowerShell Loop through Array
    • PowerShell add to array
    • PowerShell ForEach Loop
    • PowerShell Break
    • PowerShell Continue
    • Switch Case in PowerShell
    • PowerShell If-Not
    • Try-catch in PowerShell
  • Functions
    • PowerShell Functions
    • PowerShell String Functions
    • powershell nslookup
    • PowerShell here string
    • PowerShell Wildcards
    • Regex in PowerShell
    • PowerShell not like
    • PowerShell Filter
    • PowerShell Sleep
    • PowerShell where
    • PowerShell join string
    • PowerShell Exit
    • PowerShell null
    • PowerShell Dictionary
    • PowerShell Location
    • PowerShell Start-Service
    • PowerShell is not digitally signed
    • PowerShell Uptime
    • PowerShell Create Directory
    • PowerShell Trim
    • PowerShell Join-Path
    • PowerShell Execution Policy
    • PowerShell SubString
    • PowerShell Format Table
    • PowerShell Import Module
    • PowerShell ForEach Object
    • PowerShell Alias
    • PowerShell Scheduled Task
    • PowerShell Convert String to Date
    • PowerShell Split String
    • PowerShell Multiline String
    • PowerShell MultiLine Comment
    • PowerShell Rename Folder
    • PowerShell Delete Folder
    • PowerShell String Replace
    • PowerShell join
    • PowerShell xcopy
    • PowerShell Base64
    • PowerShell Tail
    • PowerShell User List
    • PowerShell remove User from group
    • PowerShell JSON Format
    • PowerShell Send Mail
    • PowerShell Convert to String
    • PowerShell Start-Process
    • PowerShell change directory
    • PowerShell Open File
    • PowerShell Batch File
    • PowerShell ZIP
    • PowerShell unzip
    • PowerShell XML
    • PowerShell XML Parsing
    • Remote PowerShell
    • PowerShell Escape Character
    • PowerShell scriptblock
    • PowerShell Executable Location
    • PowerShell Import-CSV?
    • PowerShell Export CSV
  • Interview Questions
    • PowerShell Interview Questions

Related Courses

Shell Scripting Course

All in One Data Science Courses

Data Visualization Courses

Get Help in PowerShell

By Priya PedamkarPriya Pedamkar

Get-Help in PowerShell

Introduction to Get Help in PowerShell

Windows PowerShell is a scripting language that is built on .net platform designed to automate the tasks related to windows application and administration. The term PowerShell is a combination of the language and the interface in which the commands/scripts will be run. The first version of PowerShell was introduced in the year 2006. There are two types of interface where can PowerShell commands can be run; windows PowerShell is like a command prompt where PowerShell cmdlets can be run, and Windows PowerShell ISE is where PowerShell scripts (a compilation of PowerShell cmdlets) can be run and debugged. It is an object-oriented language thereby allowing it to integrate with .net interfaces. It is now open-source and can be installed on another OS’s as well. In this post, we’re going to look at the various examples of get help in Powershell.

To start a PowerShell session, type “PowerShell” in command prompt.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,112 ratings)

PowerShell Cmdlets and Variables: The commands in PowerShell are referred to as “cmdlets”. The available list can be got by running the below cmdlet.

  • Get-Command: Cmdlet

Get Help in PowerShell: For any human being to remember the syntax or the cmdlets any programming language is difficult and a tedious task. To overcome this challenge PowerShell has numerous help articles. To get help about any PowerShell cmdlet the Get-Help cmdlet can be used. It provides the syntax and the way to use it to a cmdlet. For Ex: Get-Help Get-Process this will display the syntax and the aliases of Get-Process Cmdlet.

Examples of Get Help in PowerShell

The examples of get help in PowerShell are explained below:

1. To Create a New-Folder

Cmdlet: Get-Help New-Item

Syntax:

New-Item [-Path] <string[]> [-ItemType <string>] [-Value <Object>] [-Force] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction]  [<CommonParameters>] New-Item [[-Path] <string[]>] -Name <string> [-ItemType <string>] [-Value <Object>] [-Force] [-Credential
<pscredential>] [-WhatIf] [-Confirm] [-UseTransaction]  [<CommonParameters>]

Aliases: Ni

EG: New-Item -Path ‘C:\Vignesh\NewPowerShellFolder’ -ItemType Directory.

Output: This will create a new folder,” NewPowerShellFolder’ in the specified path.

2. To Copy an Item

Cmdlet: Get-Help Copy-Item

Syntax:

Copy-Item [-Path] <string[]> [[-Destination] <string>] [-Container] [-Force] [-Filter <string>] [-Include
<string[]>] [-Exclude <string[]>] [-Recurse] [-PassThru] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-FromSession <PSSession>] [-ToSession <PSSession>]  [<CommonParameters>] Copy-Item [[-Destination] <string>] -LiteralPath <string[]> [-Container] [-Force] [-Filter <string>] [-Include
<string[]>] [-Exclude <string[]>] [-Recurse] [-PassThru] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-FromSession <PSSession>] [-ToSession <PSSession>]  [<CommonParameters>]

Aliases: 

  • cpi
  • cp
  • copy

EG: New-Item -Path ‘C:\Vignesh\NewPowerShellFolder’ -ItemType Directory.

Output: This will create a new folder,” NewPowerShellFolder’ in the specified path.

3. To Remove an Item

Cmdlet: Get-Help Remove-Item

Syntax:

Remove-Item [-Path] <string[]> [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-Recurse] [-Force] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-Stream <string[]>]  [<CommonParameters>] Remove-Item -LiteralPath <string[]> [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-Recurse] [-Force] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-Stream <string[]>] [<CommonParameters>]

Aliases:

  • ri
  • rm
  • rmdir
  • del
  • erase
  • rd

EG: Remove-Item ‘C:\Vignesh\Vignesh.txt’.

Output: This will remove the txt file.

It is possible that many users may not be able to understand a cmdlet syntax at the first go or some users may need a few examples on how to pass the parameters to a cmdlet. In that case, they will obviously try to go online and do a bit of research. This can be done from the PowerShell window itself as follows by appending online with the Get-Help cmdlet.

Get-Help Get-Child Item -Online, this will open the Microsoft help article for Get-Child Item in Internet Explorer.

Tricks and Shortcuts for Get Help in PowerShell

1. To go back to the previous cmdlets that were executed, press the up arrow. This will take us through the commands that were executed in the current PowerShell session in descending order.

2. The Get-History cmdlet can be used to get the cmdlets in a single stretch that were executed in the current session, this can be exported to a CSV file by running the following cmdlet.

Cmdlet: Get-History | Export-csv “Path to be exported.csv”

Output:

ID Command Line Execution Status

StartExecutionTime

EndExecutionTime

1 Get-Help Get-Process -Online Completed 11/18/2019 4:33 11/18/2019 4:36
2 Get-Help Get-Process -Online Completed 11/18/2019 4:33 11/18/2019 4:36
3 Get-Help Get-ChildItem -Online Completed 11/18/2019 4:33 11/18/2019 4:36
4 Get-Help Get-ChildItem -Online Completed 11/18/2019 4:33 11/18/2019 4:36
5 Get-Help Get-ChildItem -Online Completed 11/18/2019 4:33 11/18/2019 4:36

Conclusion

This article just provided a glimpse of what PowerShell is and how the Get Help can be used to know about a cmdlet. There are many more powerful things that can be done using PowerShell like making attribute changes in Active Directory, connect to IIS, SQL Server, and Microsoft exchange. By learning PowerShell, one can easily save their man-hours which they spend on mundane tasks by writing a script that will take care of those.

Recommended Articles

This is a guide to Get Help in PowerShell. Here we discuss the different examples of get help in Powershell along with its tricks and shortcuts. You may also look at the following articles to learn more –

  1. Top 7 Versions with Steps to Install PowerShell
  2. Tips and Tricks to use PowerShell Commands
  3. Different Uses Of Powershell
  4. Working with PowerShell String Functions
  5. Guide to PowerShell Remove-Item
  6. Parameters of PowerShell Move-Item
  7. Guide to PowerShell Copy-Item
  8. How to Use PowerShell with Examples?
  9. PowerShell New-Item | Examples
Popular Course in this category
Programming Languages Training (41 Courses, 13+ Projects, 4 Quizzes)
  41 Online Courses |  13 Hands-on Projects |  322+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Shell Scripting Training (4 Courses, 1 Project)4.9
All in One Data Science Bundle (360+ Courses, 50+ projects)4.8
Data Visualization Training (15 Courses, 5+ Projects)4.7
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more