PowerShell Fundamentals

In the following code what is the data type of $FooBar?
 
$Foobar = "123"
String
Integer
Array
Number
In the following code what is the data type of $FooBar?
 
$Foobar = @{'Foo' = 'Bar'}
HashTable
Array
List
Dictionary
What would the following code output?
 
$FooBar = @("31337", "This", "Epic", "Quiz")
Write-Output $FooBar[0]
31337
This
Epic
Quiz
What would the following code output?
 
1..3 -join ","
1,2,3
1,2
2,3
An error message
What is the output of the following code?
 
$Words = "abc ded cba" -split "a"
$Words.Count
1
2
3
An error message
What is the output of the following code?
 
Function FooBar() {
    $a = 5
}
$a = 10
FooBar
 
Write-Output $a
10
5
0
An error message
What numbers get outputted by the following code?
 
$a = "FOO"
$b = "foo"
If ($a -eq $b) {
    Write-Output "1"
}
If ($a -ieq $b) {
    Write-Output "2"
}
If ($a -ceq $b) {
    Write-Output "3"
}
1 and 2
1, 2 and 3
3 and 1
None of them
Which of these cmdlets can be used to get the contents of a file?
Get-Content
Get-File
Get-Text
Get-Contents
Which of these cmdlets can be used to create a new file?
New-Item
New-ChildItem
New-File
Create-File
Which of these cmdlets can be used to list files?
Get-ChildItem
List-ChildItem
Get-ChildList
Get-FileList
{"name":"PowerShell Fundamentals", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"In the following code what is the data type of $FooBar?   $Foobar = \"123\", In the following code what is the data type of $FooBar?   $Foobar = @{'Foo' = 'Bar'}, What would the following code output?   $FooBar = @(\"31337\", \"This\", \"Epic\", \"Quiz\") Write-Output $FooBar[0]","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker