Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <nav id="navbar">
  <header>PowerShell Beginner Documentation</header>
  <a class="nav-link" href="#Introduction">Introduction</a>
  <a class="nav-link" href="#Learning_PowerShell">Learning PowerShell</a>
  <a class="nav-link" href="#Installing_PowerShell">Installing PowerShell</a>
  <a class="nav-link" href="#Getting_Started_with_PowerShell">Getting Started with PowerShell</a>
  <a class="nav-link" href="#Getting_Familiar_with_PowerShell_Commands">Getting Familiar with PowerShell Commands</a>
  <a class="nav-link" href="#Getting_Help">Getting Help</a>
  <a class="nav-link" href="#Discover_Commands_Available_on_Your_System">Discover Commands Available on Your System</a>
  <a class="nav-link" href="#References">References</a>
<main id="main-doc">
  <section id="Introduction" class="main-section">
    <p>PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.</p>
    <p>PowerShell commands let you manage computers from the command line. PowerShell providers let you access data stores, such as the registry and certificate store, as easily as you access the file system. PowerShell includes a rich expression parser
      and a fully developed scripting language.</p>
  <section id="Learning_PowerShell" class="main-section">
    <header>Learning PowerShell</header>
    <p>Whether you're a Developer, a DevOps or an IT Professional, this doc will help you getting started with PowerShell. In this document we'll cover the following: installing PowerShell, samples walkthrough, PowerShell editor, debugger, testing tools
      and a map book for experienced bash users to get started with PowerShell faster.</p>
    <p>The exercises in this document are intended to give you a solid foundation in how to use PowerShell. You won't be a PowerShell guru at the end of reading this material but you will be well on your way with the right set of knowledge to start using
  <section id="Installing_PowerShell" class="main-section">
    <header>Installing PowerShell</header>
    <p>First you need to set up your computer working environment if you have not done so. Choose the platform below and follow the instructions. At the end of this exercise, you should be able to launch the PowerShell session.</p>
      <li><a href="" target="_blank">PowerShell on Linux</a></li>
      <li><a href="" target="_blank">PowerShell on macOS</a></li>
      <li><a href="" target="_blank">PowerShell on Windows</a></li>
    <p>For this tutorial, you do not need to install PowerShell if you are running on Windows. You can launch PowerShell console by pressing Windows key, typing PowerShell, and clicking on Windows PowerShell. However if you want to try out the latest PowerShell,
      follow the <a href="" rel="nofollow">PowerShell on Windows</a>.</p>
      <li>Alternatively you can get the PowerShell by <a href="" target="_blank">building it</a></li>
  <section id="Getting_Started_with_PowerShell" class="main-section">
    <header>Getting Started with PowerShell</header>
    <p>PowerShell commands follow a Verb-Noun semantic with a set of parameters. It's easy to learn and use PowerShell. For example, <code>Get-Process</code> will display all the running processes on your system.</p>
  <section id="Getting_Familiar_with_PowerShell_Commands" class="main-section">
    <header>Getting Familiar with PowerShell Commands</header>
    <p>In this section, you will learn how to</p>
      <li>create a file, delete a file and change file directory</li>
      <li>discover what version of PowerShell you are currently using</li>
      <li>exit a PowerShell session</li>
      <li>get help if you needed</li>
      <li>find syntax of PowerShell cmdlets</li>
      <li>and more</li>
    <p>As mentioned above, PowerShell commands are designed to have Verb-Noun structure, for instance <code>Get-Process</code>, <code>Set-Location</code>, <code>Clear-Host</code>, etc. Let’s exercise some of the basic PowerShell commands, also known as <strong>cmdlets</strong>.</p>
    <p>Let’s exercise some of the basic PowerShell commands, also known as <strong>cmdlets</strong>.</p>
    <p>Please note that we will use the PowerShell prompt sign <strong>PS /&gt;</strong> as it appears on Linux in the following examples. It is shown as <code>PS C:\&gt;</code> on Windows.</p>
      <li><code>Get-Process</code>: Gets the processes that are running on the local computer or a remote computer.</li>
    <p>By default, you will get data back similar to the following:</p>
PS /> Get-Process

Handles   NPM(K)    PM(K)     WS(K)     CPU(s)     Id    ProcessName
-------  ------     -----     -----     ------     --    -----------
    -      -          -           1      0.012     12    bash
    -      -          -          21     20.220    449    powershell
    -      -          -          11     61.630   8620    code
    -      -          -          74    403.150   1209    firefox

    <p>Only interested in the instance of Firefox process that is running on your computer?</p>
    <p>Try this:</p>
PS /> Get-Process -Name firefox

Handles   NPM(K)    PM(K)     WS(K)    CPU(s)     Id   ProcessName
-------  ------     -----     -----    ------     --   -----------
    -      -          -          74   403.150   1209   firefox
    <p>Want to get back more than one process? Then just specify process names and separate them with commas.</p>
PS /> Get-Process -Name firefox, powershell
Handles   NPM(K)    PM(K)     WS(K)    CPU(s)     Id   ProcessName
-------  ------     -----     -----    ------     --   -----------
    -      -          -          74   403.150   1209   firefox
    -      -          -          21    20.220    449   powershell
    <ol start="2">
      <li><code>Clear-Host</code>: Clears the display in the host program.
PS /> Get-Process
PS /> Clear-Host
    <p>Type too much just for clearing the screen?</p>
    <p>Here is how the alias can help.</p>
    <ol start="3">
      <li><code>Get-Alias</code>: Gets the aliases for the current session.</li>
PS /> Get-Alias

CommandType     Name
-----------     ----

Alias           cd -> Set-Location
Alias           cls -> Clear-Host
Alias           clear -> Clear-Host
Alias           copy -> Copy-Item
Alias           dir -> Get-ChildItem
Alias           gc -> Get-Content
Alias           gmo -> Get-Module
Alias           ri -> Remove-Item
Alias           type -> Get-Content
    <p>As you can see cls or <code>clear</code> is an alias of <code>Clear-Host</code>.</p>

    <p>Now try it:</p>

    <code>PS /> Get-Process
PS /> cls</code>
    <ol start="4">
      <li><code>cd -> Set-Location</code>: Sets the current working location to a specified location.</li>
    PS /> Set-Location /home
    PS /home>
    <ol start="5">
      <li><code>dir -> Get-ChildItem</code>: Gets the items and child items in one or more specified locations.</li>
<span class="comment"># Get all files under the current directory:</span> 
PS /> Get-ChildItem 
<span class="comment"># Get all files under the current directory as well as its subdirectories:</span> 
PS /> cd $home 
PS /home/jen> dir -Recurse 
<span class="comment"># List all files with "txt" file extension. </span> 
PS /> cd $home PS /home/jen> dir –Path *.txt -Recurse 
    <ol start="6">
      <li><code>New-Item</code>: Creates a new item.</li>
<span class="comment"># An empty file is created if you type the following:</span>
PS /home/jen> New-Item -Path ./test.txt

    Directory: /home/jen

Mode                LastWriteTime         Length  Name
----                -------------         ------  ----
-a----         7/7/2016   7:17 PM              0  test.txt

    <p>You can use the <code>-Value</code> parameter to add some data to your file.</p>
    <>For example, the following command adds the phrase <code>Hello world!</code> as a file content to the <code>test.txt</code>.
      <p>Because the test.txt file exists already, we use <code>-Force</code> parameter to replace the existing content.</p>
PS /home/jen> New-Item -Path ./test.txt -Value "Hello world!" -Force

    Directory: /home/jen

Mode                LastWriteTime         Length  Name
----                -------------         ------  ----
-a----         7/7/2016   7:19 PM             24  test.txt
      <p>There are other ways to add some data to a file.</p>
      <p>For example, you can use <code>Set-Content</code> to set the file contents:</p>
      <code>PS /home/jen>Set-Content -Path ./test.txt -Value "Hello world again!"</code>
      <p>Or simply use <code>></code> as below:</p>
<span class="comment"># create an empty file</span>
"" > test.txt

<span class="comment"># set "Hello world!" as content of test.txt file</span>
"Hello world!!!" > test.txt
      <p>The pound sign # above is used for comments in PowerShell.</p>
      <ol start="7">
        <li><code>type -> Get-Content</code>: Gets the content of the item at the specified location.</li>
PS /home/jen> Get-Content -Path ./test.txt
PS /home/jen> type -Path ./test.txt

Hello world again!
      <ol start="8">
        <li><code>del -> Remove-Item</code>: Deletes the specified items.</li>
      <p>This cmdlet will delete the file <code>/home/jen/test.txt</code>:</p>
      <code>PS /home/jen> Remove-Item ./test.txt</code>
      <ol start="9">
        <li><code>$PSVersionTable</code>: Displays the version of PowerShell you are currently using.</li>
      <p>Type $PSVersionTable in your PowerShell session, you will see something like below. "PSVersion" indicates the PowerShell version that you are using.</p>
    Name                           Value
    ----                           -----
    PSVersion                      6.0.0-alpha
    PSEdition                      Core
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    GitCommitId                    v6.0.0-alpha.12
    WSManStackVersion              3.0
    PSRemotingProtocolVersion      2.3
      <ol start="10">
        <li><code>Exit</code>:To exit the PowerShell session, type exit.</li>
      <code>PS /home/jen> exit</code>
  <section id="Getting_Help" class="main-section">
    <header>Getting Help</header>
    <p>The most important command in PowerShell is possibly the Get-Help, which allows you to quickly learn PowerShell without having to search around the internet.</p>

    <p>The <code>Get-Help</code> cmdlet also shows you how PowerShell commands work with examples.</p>
    <p>It shows the syntax and other technical information of the <code>Get-Process </code> cmdlet.</p>
    <code>PS /> Get-Help -Name Get-Process</code>
    <p>It displays the examples how to use the <code>Get-Process</code> cmdlet.</p>
    <code>PS />Get-Help -Name Get-Process -Examples</code>
    <p>If you use <strong>-Full</strong> parameter, for example, <code>Get-Help -Name Get-Process -Full</code>, it will display more technical information.</p>
  <section id="Discover_Commands_Available_on_Your_System" class="main-section">
    <header>Discover Commands Available on Your System</header>
    <p>You want to discover what PowerShell cmdlets available on your system? Just run <code>Get-Command</code> as below:</p>
    <code>PS /> Get-Command</code>
    <p>If you want to know whether a particular cmdlet exists on your system, you can do something like below:</p>
    <code>PS /> Get-Command Get-Process</code>
    <p>If you want to know the syntax of <code>Get-Process</code> cmdlet, type:</p>
    <code>PS /> Get-Command Get-Process -Syntax</code>
    <p>If you want to know how to use the Get-Process, type:</p>
    <code>PS /> Get-Help Get-Process -Example</code>
  <section id="References" class="main-section">
    <p>Original sources of text:</p>
    <li>GitHub. 2018. <a href="">PowerShell Beginner's Guide.</a>[Accessed 5 Dec. 2018].</li>
    <li>Microsoft. 2018. <a href="">PowerShell Scripting.</a> [Accessed 5 Dec. 2018].</li>


                @import url("");

:root {
  box-sizing: border-box;
body {
  display: flex;
  font-family: 'Ubuntu', sans-serif;
  margin:0 1% 0 1%;
  padding: 0;
  @media (max-width: 850px) {
    flex-direction: column;

header {
  font-weight: bold !important;
  border-bottom: 3px dimgray solid;
  margin-top: 2em;

  color: #0366d6;

#navbar {
  display: flex;
  position: fixed;
  top: 0;
  height: 100%;
  width: 25%;
  flex-direction: column;
  background: white;
  @media (max-width: 850px) {
    position: static;
    margin-bottom: 1em;
    height: auto;
    border-bottom: thick black solid;
    width: auto;

nav > header {
  font-size: 150%;
  @media (max-width: 850px){
    text-align: center;

.nav-link {
  display: block;
  color: #0366d6;
  border-bottom: 2px dimgray solid;
  margin: 1%;
  padding: 0 1em 1em 1em;

main {
  padding: 0 1em 0 1em;
  margin-left: 1em;
  border-left: thick dimgray solid;
  margin-left: 26%;
  @media (max-width: 850px) {
    border-left: none;
    margin: 0;

section > header {
  font-size: 200%;

code {
  color: white;
  background-color: #012456;
  display: inline-block;
  padding: 0 1em 0 1em;
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
  max-width: 100%;
  overflow: auto;
  border-left: thick white inset;

.comment {
  color: #98fb98;