Intro to Powershell 1

What format do CMDLets follow?
Verb-Noun
Verb-Adjective
Noun-Verb
Noun-Noun
Verb-Noun
What version of Windows first introduced PowerShell?
Windows 7 and Windows Server 2012 R2
Windows 8 and Windows Server 2016
Windox XP
Windows Vista
Windows 7 and Windows Server 2012 R2
What is PowerShell?
A scripting langauge to use directly interact with Windows
An updated version of Command Prompt
A replacement for Terminal
An Apple product
A scripting langauge to use directly interact with Windows
What technology was Powershell built on?
.NET
Rust
Ruby
python
.NET
What is the native PowerShell command to view the working directory?
Get-Location
Get-Directory
View-Directory
List-File
Get-Location
What is the command to list files within a directory?
Get-ChildItem
Get-Contents
Get-Content
View-ChildItem
Get-ChildItem
What is the native command to change directory within PowerShell?
Set-Location
Set-Directory
Get-Directory
Change-Directory
Set-Location
What is the CMDLet use to create a new file within PowerShell?
New-Item
Make-Item
New-File
Create-File
New-Item
What switch needs to be added to create a directory?
-Type Directory
-Type Folder
-Folder
-Dir
-Type Directory
Which of the following commands would successfully write content to a new file?
$content = 'Hello world! This is the first line of my file.' | out-file -filepath C:\temp\testfile1.txt
$content = 'Hello world! This is the first line of my file.' | out-put-content -filepath C:\temp\testfile1.txt
$content = 'Hello world! This is the first line of my file.' | $content -filepath C:\temp\testfile1.txt
$content = 'Hello world! This is the first line of my file.' | out-file -filelocation C:\temp\testfile1.txt
$content = 'Hello world! This is the first line of my file.' | out-file -filepath C:\temp\testfile1.txt
Which .NET class can be used to create a new folder?
CreateDirectory
CreateFolder
SpawnFolder
CreateContent
CreateDirectory
When using objects with PowerShell we first must define the object, which command would define an object?
$newdirectory = new-object -ComObject scripting.filesystemobject
$newdirectory = new-object -PowerShellObject scripting.filesystemobject
$newdirectory = new-directory -ComObject scripting.filesystemobject
$newdirectory = new-object -Object scripting.filesystemobject
$newdirectory = new-object -ComObject scripting.filesystemobject
Your Score
Score Label
Score Summary