Basic Powershell Commands Flashcards

1
Q

Get-Command

A

When used by itself, the Get-Command cmdlet will display a list of every known PowerShell cmdlet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Get-Help

A

Get-Help can show you how to use a cmdlet.
(Ex: Get-Help Get-Command)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Clear-Host

A

The cmdlet is used to clear the screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Set-Location

A

It can be used as an alternative to the CD command (CD is a DOS leftover and stands for Change Directory).
(Ex: Set-Location -Path “C:\Users\Brien”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Get-ChildItem

A

When you type the Get-ChildItem cmdlet by itself, PowerShell will display the contents of the current folder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Get-Process

A

The Get-Process command helps you retrieve and show a list of all the active system processes with their identifiers (IDs).
(Ex: Get-Process -ID 20496 | Stop-Process)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Start-Process

A

You can use the Start-Process cmdlet in PowerShell to start one or more processes on a local computer.
(Ex: Start-Process notepad )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Get-Service

A

The Get-Service cmdlet lets you view your computer’s status and list of services.
(Ex: Get-Service -Name “Win*”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Get-ChildItem

A

The Get-ChildItem command is a handy cmdlet to look for folders and files and quickly perform content-based searches without using File Explorer.
(Ex: Get-ChildItem “C:")

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Copy-Item

A

The Copy-Item cmdlet lets you copy-paste files and folders and their contents to a different directory.
(Ex: Copy-Item “E:\Folder1” -Destination “E:\Folder2” -Recurse)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Remove-Item

A

The Remove-Item cmdlet lets you delete files, folders, functions, and other data types from the specified directory.
(Ex: Remove-Item E:\Folder1\Test.txt)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Set-ExecutionPolicy

A

The default execution policy in PowerShell is set to Restricted. This prevents the execution of malicious scripts in the PowerShell environment. However, when you execute a local PowerShell script, you may encounter the execution script is disabled on this system error.
(Ex: Set-ExecutionPolicy RemoteSigned)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Get-History

A

You can use the Up-Down arrow key to scroll through the recently executed commands in PowerShell. However, to view a list of all the recently executed commands in your current session at once, you can use the Get-History cmdlet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly