wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

POP_chapter7

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What is the purpose of the Get-Process command in PowerShell?

a)

To display information about running processes

b)

To display information about running processes

c)

To stop a running process

d)

None of the above

2.

What is the purpose of the Set-ExecutionPolicy command in PowerShell

a)

.To set the execution policy for scripts

b)

To set the execution policy for cmdlets

c)

To set the execution policy for both scripts and cmdlets

d)

None of the above

3.

Which command is used to rename a file or directory in PowerShell?

a)

Move-Item

b)

Rename-Item

c)

.Copy-Item

d)

None of the above

4.

How do you declare a type of variable when declaring a variable?

a)

With parentheses surrounding the type of variable before the declaration (ie. "(integer) $variable"

b)

With square brackets surrounding the type of variable before the declaration (ie. "[integer] $variable"

c)

.By stating that the variable equals the type of variable before declaring the actual variable (ie. "$variable=integer")

d)

.You cannot declare the type of variable, powershell does this automatically when you declare the variable for the first time.

5.

How can you make a variable display the current date and time?

a)

Create an [object] variable set to get-date

b)

Create a [datetime] variable set to get-date

c)

.Create an [integer] variable set to get-date

d)

Create a [timespan] variable set to get-date

6.

What is the command to write something to the console display?

a)

draw-host

b)

write-host

c)

.draw-output

d)

.write-output

7.

What is PowerShell?

a)

A programming language for web development

b)

A command-line shell and scripting language

c)

A markup language for creating documents

d)

A database management system

8.

Which command is used to create a new directory in PowerShell

a)

md

b)

dir

c)

cd

d)

rd

9.

What does the command “Get-ChildItem” do in PowerShell?

a)

Lists all child processes of the current process

b)

Lists all child objects in a directory

c)

Gets information about a specified child item

d)

None of the above

10.

Which command is used to get information about the PowerShell version that is installed on a system?

a)

Get-Version

b)

Show-Version

c)

Get-Host

d)

None of the above

11.

What is the purpose of the Get-Process command in PowerShell?

a)

To display information about running processes

b)

To start a new process

c)

To stop a running process

d)

None of the above

12.

Which command is used to create a new folder in PowerShell?

a)

New-Folder

b)

Create-Folder

c)

New-Item

d)

None of the above

13.

Which command is used to display the environment variables in PowerShell?

a)

Get-Environment

b)

Show-Environment

c)

Set-Environment

d)

None of the above

14.

Which command is used to set the execution policy in PowerShell?

a)

Set-ExecutionPolicy

b)

Update-ExecutionPolicy

c)

Set-Policy

d)

None of the above