{"id":44859,"date":"2018-06-28T23:01:58","date_gmt":"2018-06-28T15:01:58","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=44859"},"modified":"2021-07-01T20:55:35","modified_gmt":"2021-07-01T12:55:35","slug":"windows-powershell-commands","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/","title":{"rendered":"20 Windows PowerShell Commands You Must Know"},"content":{"rendered":"<p>Windows PowerShell is the new <a href=\"https:\/\/www.hongkiat.com\/blog\/developers-command-line\/\/\">command-line shell<\/a>, which is <strong>more powerful and scriptable<\/strong> than Command Prompt. In my three years of experience of using it, I found it really useful, especially if you are into <strong>automating or scripting tasks<\/strong>. However, most of us either do not know about it or do not prefer using it in place of the old command-line shell.<\/p>\n<p>In this post, I am going to share <strong>useful yet straightforward commands<\/strong> (with examples) of Windows PowerShell. You can use these commands to accomplish <a href=\"https:\/\/www.hongkiat.com\/blog\/automate-windows-10-repetitive-tasks\/\">\nnumerous tasks<\/a> \u2014 from getting help to starting processes. Shall we begin?<\/p>\n<p><strong>Note:<\/strong> Windows PowerShell is built with <strong>backward compatibility<\/strong> in mind, and thus supports many commands of the Command Prompt. That said, you can continue using the old commands in its new, colorful interface.<\/p>\n<p class=\"note\"><strong>Read Also:<\/strong> <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/automate-windows-10-repetitive-tasks\/\" rel=\"noopener noreferrer\">Tips and Tools to Automate Repetitive Tasks on Windows 10<\/a><\/p>\n<h2>Get-Help [help]<\/h2>\n<p>If you are new to PowerShell, you may run into troubles; and in such situations, Get-Help becomes your savior. It provides <strong>necessary information about cmdlets, commands<\/strong>, functions, scripts, and workflows of the PowerShell.<\/p>\n<p>Moreover, it\u2019s easy: you need to type <code>Get-Help<\/code> followed by the command, of which, you seek the details. For example, you can get information about \u201cGet-Process\u201d using <code>Get-Help Get-Process<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg\" width=\"859\" height=\"634\" alt=\"How to use Get-Help\"><\/figure>\n<h2>Get-Command [gcm]<\/h2>\n<p>Windows PowerShell allows discovering its commands and features using Get-Command. It displays the list of <strong>commands of a specific feature<\/strong> or for a specific purpose based on your search parameter.<\/p>\n<p>You only need to type <code>Get-Command<\/code> followed by your search query in the PowerShell. For example, <code>Get-Command *-service*<\/code> displays commands with \u201c-service\u201d in its name. Please remember to <strong>use the asterisks on both sides of your query<\/strong> because it is a wild card that helps to search for the unknown.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-command.jpg\" width=\"859\" height=\"634\" alt=\"How to use Get-Command\"><\/figure>\n<h2>Invoke-Command [icm]<\/h2>\n<p>When you wish to <strong>run a command or a script<\/strong> of PowerShell \u2014 locally or remotely on single or multiple computer(s) \u2014 \u201cInvoke-Command\u201d is your friend. It is easy-to-use and helps you to batch-control computers.<\/p>\n<p>You must type <code>Invoke-Command<\/code> followed by the command or the script with its complete path. For example, you can <strong>run a command \u201cGet-EventLog\u201d<\/strong> using <code>Invoke-Command -ScriptBlock {Get-EventLog system -Newest 50}<\/code> or on a remote computer \u201cServer01\u201d using <code>Invoke-Command -ScriptBlock {Get-EventLog system -Newest 50} -ComputerName Server01<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-invoke-command.jpg\" width=\"859\" height=\"634\" alt=\"How to use Invoke-Command\"><\/figure>\n<h2>Invoke-Expression [iex]<\/h2>\n<p>Invoke-Expression <strong>runs another command or expression<\/strong>. If you are providing an expression or a string as its input, this command first evaluates it, then runs it, but also works only locally, unlike the previous command.<\/p>\n<p>You must type <code>Invoke-Expression<\/code> followed by a command or an expression. For instance, you can assign a variable \u201c$Command\u201d with a string telling the command \u201cGet-Process\u201d. When you run <code>Invoke-Expression $Command<\/code>, \u201cGet-Process\u201d gets run as a command on your local computer.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-invoke-expression.jpg\" width=\"859\" height=\"634\" alt=\"How to use Invoke-Expression\"><\/figure>\n<h2>Invoke-WebRequest [iwr]<\/h2>\n<p>You can <strong>download, log in, and scrape for information<\/strong> on websites and web services while working on Windows PowerShell using the Invoke-WebRequest.<\/p>\n<p>You must use it like <code>Invoke-WebRequest<\/code> followed by its parameters. For example, you can get the links on a given web page by using the command as <code>(Invoke-WebRequest -Uri \"https:\/\/docs.microsoft.com\").Links.Href<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-invoke-webrequest.jpg\" width=\"963\" height=\"634\" alt=\"How to use Invoke-WebRequest\"><\/figure>\n<h2>Set-ExecutionPolicy<\/h2>\n<p>Although creating and executing scripts (having extension \u201cps1\u201d) in Windows PowerShell is possible; however, there are restrictions for security purposes. But you can <strong>switch the security level<\/strong> using the Set-ExecutionPolicy command.<\/p>\n<p>You can type <code>Set-ExecutionPolicy<\/code> followed by one of the four security levels \u2014 <strong>Restricted, Remote Signed, All Signed, or Unrestricted<\/strong> to use the command. For example, you can assign the restricted policy status using <code>Set-ExecutionPolicy -ExecutionPolicy Restricted<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-set-executionpolicy.jpg\" width=\"859\" height=\"634\" alt=\"How to use Set-ExecutionPolicy\"><\/figure>\n<h2>Get-Item [gi]<\/h2>\n<p>If you are looking for <strong>information on an item<\/strong> at any given location, say a file on your hard disk, Get-Item is the best way to acquire it in Windows PowerShell. You must know that <strong>it does not get the contents of the item<\/strong>, such as files and sub-directories in a given directory unless explicitly specified by you.<\/p>\n<p>You must type <code>Get-Item<\/code> followed by a path or a string along with its parameters if any. For example, you can get all the items (files or folders) beginning with \u201cM\u201d in the current directory using <code>Get-Item M*<\/code>. Along with content of directories, it can also get the content of registry keys.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-item.jpg\" width=\"859\" height=\"634\" alt=\"How to use Get-Item\"><\/figure>\n<h2>Copy-Item [copy]<\/h2>\n<p>If you need to <strong>copy files and directories<\/strong> on your storage disk or registry entries and keys in the registry, you can use Copy-Item. It functions similar to the \u201ccp\u201d command we have in the Command Prompt, but it is much better.<\/p>\n<p>You can make use of <code>Copy-Item<\/code> command to <strong>copy and rename items in the same command<\/strong> as well \u2014 give a new name as the destination. For instance, you can copy and rename \u201cServices.htm\u201d to \u201cMyServices.txt\u201d using <code>Copy-Item \"C:\\Services.htm\" -Destination \"C:\\MyData\\MyServices.txt\"<\/code>.<\/p>\n<h2>Remove-Item [del]<\/h2>\n<p>If you wish <strong>to delete items<\/strong> such as files, folders, functions, and registry keys and variables, Remove-Item is the command for you. What I found interesting is, it provides parameters to include and exclude items.<\/p>\n<p>You can make use of <code>Remove-Item<\/code> command to <strong>delete items from specific locations using parameters<\/strong>. For example, you can delete the file \u201cMyServices.txt\u201d with the command <code>Remove-Item \"C:\\MyData\\MyServices.txt\"<\/code>.<\/p>\n<h2>Get-Content [cat]<\/h2>\n<p>When you need to view the content of a text file at a specific location, you open and read it in a <a href=\"https:\/\/www.hongkiat.com\/blog\/free-code-editors-reviewed\/\">co<\/a><a href=\"https:\/\/www.hongkiat.com\/blog\/free-code-editors-reviewed\/\">de\/<\/a><a href=\"https:\/\/www.hongkiat.com\/blog\/free-code-editors-reviewed\/\">te<\/a><a href=\"https:\/\/www.hongkiat.com\/blog\/free-code-editors-reviewed\/\">xt editor like Notepad++<\/a>. In Windows PowerShell, you can use Get-Content to <strong>retrieve the content<\/strong> without opening the file.<\/p>\n<p>For example, you can retrieve 50 lines of content of \u201cServices.htm\u201d, then you can use <code>Get-Content \"C:\\Services.htm\" -TotalCount 50<\/code>.<\/p>\n<h2>Set-Content <!-- Shortcode is missing \"name\" attribute --><\/h2>\n<p>You can save text to files using Set-Content, similar to the \u201cecho\u201d command of the <a href=\"https:\/\/www.hongkiat.com\/blog\/bash-ubuntu-windows-10\/\">Bash Shell<\/a>. In combination with the Get-Content, you can also <strong>retrieve the content of one file and copy it into another file<\/strong> using this command.<\/p>\n<p>For example, you can type <code>Set-Content<\/code> to <strong>write or replace the content<\/strong> of a file with new content. Moreover, you can club it with the previous command\u2019s example to save its output into a new file named \u201cSample.txt\u201d using <code>Get-Content \"C:\\Services.htm\" -TotalCount 50 | Set-Content \"Sample.txt\"<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-set-content.jpg\" width=\"859\" height=\"171\" alt=\"How to use Set-Content\"><\/figure>\n<h2>Get-Variable [gv]<\/h2>\n<p>If you are looking to use variables in Windows PowerShell, Get-Variable command helps you to <strong>visualize the values of variables<\/strong>. It shows them in a tabular form and allows including, excluding, and using wildcards.<\/p>\n<p>You can use this command by typing <code>Get-Variable<\/code> followed by its options and parameters. For example, you can retrieve the value for a variable named \u201cdesc\u201d using the following code: <code>Get-Variable -Name \"desc\"<\/code>.<\/p>\n<h2>Set-Variable [set]<\/h2>\n<p>You can <strong>assign or change\/reset the value of a variable<\/strong> using the command Set-Variable. As a shortcut, you can also set a simple variable using the format ${ <strong>$VarName = VarValue<\/strong> }$, like <code>$desc = \"A Description\"<\/code>.<\/p>\n<p>You can use the command <code>Set-Variable<\/code> followed by its parameters to set a variable. For instance, we can set the value for a variable named \u201cdesc\u201d using the command <code>Set-Variable -Name \"desc\" -Value \"A Description\"<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-set-variable.jpg\" width=\"859\" height=\"227\" alt=\"How to use Set-Variable\"><\/figure>\n<h2>Get-Process [gps]<\/h2>\n<p>We usually use Task Manager to <strong>find the running processes<\/strong> on our computer. In Windows PowerShell, anyone can use Get-Process to get the list of currently running processes, which you can further process as well.<\/p>\n<p>You can write the command as <code>Get-Process<\/code> along with your search query. For example, if you need information about the processes with \u201cexplore\u201d in their name, you can type <code>Get-Process *explore*<\/code> (note the asterisks).<\/p>\n<h2>Start-Process [saps]<\/h2>\n<p>Windows PowerShell makes it easy to <strong>start one or more processes<\/strong> on your computer. I found this command is handy in scripting apps since it is one of the must-have commands you will need for automating a task.<\/p>\n<p>You can type <code>Start-Process<\/code> followed by its parameters to use the command. For instance, you can start Notepad by typing <code>Start-Process -FilePath \"notepad\" -Verb runAs<\/code> in the Windows PowerShell.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-start-process.jpg\" width=\"1200\" height=\"217\" alt=\"How to use Start-Process\"><\/figure>\n<h2>Stop-Process [kill]<\/h2>\n<p>You can <strong>stop specific or all instances of a process running<\/strong> on your computer using its name or PID (Process ID), thanks to the command Stop-Process. What makes it compelling is, you can detect a process is stopped or not and you can even stop the processes not owned or started by the current user.<\/p>\n<p>You can type the command <code>Stop-Process<\/code> followed by its parameters to stop the given processes. For example, you can stop all the processes of Notepad using the command <code>Stop-Process -Name \"notepad\"<\/code>.<\/p>\n<h2>Get-Service [gsv]<\/h2>\n<p>When you need <strong>information on specific services<\/strong> (running or stopped) on your computer, you can use Get-Service. It displays the services installed in your system and provides options to filter and include and exclude them.<\/p>\n<p>If you wish to use this command, you can type <code>Get-Service<\/code> followed by its parameters. For example, type the following <code>Get-Service | Where-Object {$_.Status -eq \"Running\"}<\/code> to get the services \u201crunning\u201d on your system.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-service.jpg\" width=\"859\" height=\"634\" alt=\"How to use Get-Service\"><\/figure>\n<h2>Start-Service [sasv]<\/h2>\n<p>If you wish to <strong>start a service <\/strong>on your computer, Start-Service command can help you do the same from Windows PowerShell. I found it is powerful enough to start a service even if that service is disabled on your computer.<\/p>\n<p>You need to specify the name of the service while using the command <code>Start-Service<\/code>. For instance, <code>Start-Service -Name \"WSearch\"<\/code> starts the service \u201cWindows Search\u201d on your local computer.<\/p>\n<h2>Stop-Service [spsv]<\/h2>\n<p>If you wish to <strong>stop services running<\/strong> on your computer, Stop-Service command will prove helpful. You need to specify the name of the service along with <code>Stop-Service<\/code>. For instance, type <code>Stop-Service -Name \"WSearch\"<\/code> to stop the service \u201cWindows Search\u201d on your computer.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-stop-service.jpg\" width=\"884\" height=\"178\" alt=\"How to use Stop-Service\"><\/figure>\n<h2>ConvertTo-HTML<\/h2>\n<p>PowerShell can provide amazing information about your system. However, it is mostly presented in an indigestible format, but you can use ConvertTo-HTML to <strong>create and format a report<\/strong> to analyze it or send it to someone.<\/p>\n<p>You can use <code>ConvertTo-HTML<\/code> along with the output of another command using piping. For example <code>Get-Service | ConvertTo-HTML -Property Name, Status &gt; C:\\Services.htm<\/code> displays the list of all the services and their status in the form of a web report, which is stored in the file \u201cServices.htm\u201d.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-convertto-html.jpg\" width=\"1200\" height=\"557\" alt=\"How to use ConvertTo-HTML\"><\/figure>","protected":false},"excerpt":{"rendered":"<p>A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.<\/p>\n","protected":false},"author":120,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[3053,171],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>20 Windows PowerShell Commands You Must Know - Hongkiat<\/title>\n<meta name=\"description\" content=\"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"20 Windows PowerShell Commands You Must Know\" \/>\n<meta property=\"og:description\" content=\"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-28T15:01:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-01T12:55:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg\" \/>\n<meta name=\"author\" content=\"Ashutosh KS\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashutosh KS\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/\"},\"author\":{\"name\":\"Ashutosh KS\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/0c0611010da9a578caa32a34232cf7bd\"},\"headline\":\"20 Windows PowerShell Commands You Must Know\",\"datePublished\":\"2018-06-28T15:01:58+00:00\",\"dateModified\":\"2021-07-01T12:55:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/\"},\"wordCount\":1531,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/windows-powershell-commands\\\/how-get-help.jpg\",\"keywords\":[\"Command Line\",\"Microsoft Windows\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/\",\"name\":\"20 Windows PowerShell Commands You Must Know - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/windows-powershell-commands\\\/how-get-help.jpg\",\"datePublished\":\"2018-06-28T15:01:58+00:00\",\"dateModified\":\"2021-07-01T12:55:35+00:00\",\"description\":\"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/windows-powershell-commands\\\/how-get-help.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/windows-powershell-commands\\\/how-get-help.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/windows-powershell-commands\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"20 Windows PowerShell Commands You Must Know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/0c0611010da9a578caa32a34232cf7bd\",\"name\":\"Ashutosh KS\",\"description\":\"Ashutosh is a writer, entrepreneur, and a tech evangelist with expertise in the area of Computer Programming.\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\\\/\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/ashutosh_ks\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"20 Windows PowerShell Commands You Must Know - Hongkiat","description":"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/","og_locale":"en_US","og_type":"article","og_title":"20 Windows PowerShell Commands You Must Know","og_description":"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.","og_url":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2018-06-28T15:01:58+00:00","article_modified_time":"2021-07-01T12:55:35+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg","type":"","width":"","height":""}],"author":"Ashutosh KS","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Ashutosh KS","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/"},"author":{"name":"Ashutosh KS","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/0c0611010da9a578caa32a34232cf7bd"},"headline":"20 Windows PowerShell Commands You Must Know","datePublished":"2018-06-28T15:01:58+00:00","dateModified":"2021-07-01T12:55:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/"},"wordCount":1531,"commentCount":0,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg","keywords":["Command Line","Microsoft Windows"],"articleSection":["Desktop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/","url":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/","name":"20 Windows PowerShell Commands You Must Know - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg","datePublished":"2018-06-28T15:01:58+00:00","dateModified":"2021-07-01T12:55:35+00:00","description":"A list of useful and simple Windows PowerShell commands to help you achieve tasks like getting help or starting a process.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/windows-powershell-commands\/how-get-help.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/windows-powershell-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"20 Windows PowerShell Commands You Must Know"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/0c0611010da9a578caa32a34232cf7bd","name":"Ashutosh KS","description":"Ashutosh is a writer, entrepreneur, and a tech evangelist with expertise in the area of Computer Programming.","sameAs":["https:\/\/www.hongkiat.com\/"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/ashutosh_ks\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-bFx","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/44859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/120"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=44859"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/44859\/revisions"}],"predecessor-version":[{"id":55767,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/44859\/revisions\/55767"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=44859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=44859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=44859"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=44859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}