• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/13

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

13 Cards in this Set

  • Front
  • Back

How can you split a string?

Use VariableName.split(',') <- specify the separator
$MyString1 = "TestUser01.txt"
$SplitTheString = $MyString1.split('.')
$ShowMyStringFrontPart = $SplitTheString[0]
$ShowMyStringFrontPart

How can you create a full path from two separate paths?

Join-Path
$StatusFiles1 = "TestUser01.txt"
$StatusFilesListDirPath = "C:\Temp_Scripts\StatusFiles\"
$StatusFilesListPath = Join-Path $StatusFilesListDirPath $StatusFiles1
$StatusFilesListPath

What are two methods to run a specific set of code given specific conditions?

If statement
Switch Statement

What is the syntax for the if statement?

$a = "white"
if ($a -eq "red")
{"The colour is red"}
elseif ($a -eq "white")
{"The colour is white"}
else
{"Another colour"}

What is the syntax for the switch statement?

$a = "red"
switch ($a)
{
"red" {"The colour is red"}
"white"{"The colour is white"}
default{"Another colour"}
}

To sign scripts, you will need a specific kind of certificate

A Class III Authenticode Code-Signing Certificate

A HTML formatted table uses the following tags. What do they mean?



Table Row, Table Header, Table Data, e.g.

AccountNameServerClientName
AdministratorXA65-MGT2CJOPC2
testuser2XA65-MGT2CJOPC2

How can you List Available Perfmon Counter Paths?

(get-counter -listset *).paths | more

How can you Get Multiple Perfmon Counters?

get-counter -counter (get-content C:\Temp_Scripts\mycounters.txt) -MaxSamples 10 -sampleinterval 1 | Export-counter -Path C:\Temp_Scripts\$env:computername__PerfmonData1.blg

How do you list the value data from a perfmon counter?

$MemAvailable = Get-counter -Counter "\Memory\Available MBytes"
$MemAvailable.CounterSamples.CookedValue

What is the alias for the Where-Object?

? -> Where-Object

What is the default execution policy for Windows server 2012 R2?

Remote Signed
Earlier versions of Windows Server & Win 7 were configured with Restricted as the default setting.

How can you specify the scope of a variable?

$global:a =1 # visible everywhere
$local:a = 1 # defined in this scope and visible to children
$private:a = 1 # same as local but invisible to child scopes
$script:a = 1 # visible to everything is this script