Call Us: US - +1 845 478 5244 | UK - +44 20 7193 7850 | AUS - +61 2 8005 4826

the foundation of PowerShell’s versatility.

In a nutshell, a cmdlet is a single-function command. You input cmdlets into the command line just as you would with a traditional command or utility. Cmdlets are the main way to interact with the CLI. In PowerShell, most cmdlets are written in C# and comprised of instructions designed to perform a function that returns a .NET object.

Over 200 cmdlets can be used in PowerShell. Windows PowerShell command prompt isn’t case-sensitive, so these commands can be typed in either upper or lower case. The main cmdlets are listed below:

  • Get-Location – Get the current directory
  • Set-Location – Get the current directory
  • Move-item – Move a file to a new location
  • Copy-item – Copy a file to a new location
  • Rename – item Rename an existing file
  • New-item – Create a new file

For a full list of commands available to you, use the Get-Command cmdlet. In the command line you would enter the following:

PS C:\> Get-Command

It is important to note that Microsoft restricts users from using custom PowerShell cmdlets in its default settings. In order to use PowerShell cmdlets, you need to change the ExecutionPolicy from Restricted to RemoteSignedRemote Signed will allow you to run your own scripts but will stop unsigned scripts from other users.

To change your Execution policy, type in the following PowerShell command:

PS C:\>   Set-ExecutionPolicy

To change to RemoteSigned, type the following command:

PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Make sure you’re on an Administrator account so that you have permission to set a new execution policy.