1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
By default, the type of $n will be ___________.
$n = 123
Int32
Newbie Admin wants to store the value 0 in a variable. Which of the following statements would correctly solve the problem? (Select ALL correct answers)
A. tot = 0
B. $tot
C. $tot = 0
D. $n = 0
C & D
In PowerShell, what would be printed by the code below?
$num = 1
$num = 2.8
$fnum = [Int32]$num
$fnum
3
What are the basic data types?
boolean, string, integer and floating point
PowerShell uses Double by default for numbers with a decimal point.
True
What would be printed by the following code?
$Num = 80
$str = 'The Result is $Num'
$str
The Result is $Num
Newbie Admin is writing a PowerShell script and needs to determine the number of characters stored in the string variable $str. Which of the following would be a correct way to count the characters and store the result in the variable $num?
$num = $str.length
In the statements below, remove is a ________________
$Str = "A rolling stone gathers no moss."
$Str2 = $Str.remove(4,3)
method
What would be printed by the following code?
$Num = 80
$str = "The Result is $Num"
$str
The Result is 80
In the following scenario, what is stored in $Str2?
$Str = "A rolling stone gathers no moss."
$Str2 = $Str.remove(4,3)
A rong stone gathers no moss.