• 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/10

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;

10 Cards in this Set

  • Front
  • Back

What's the command to load an assembly in PowerShell if it is located in the GAC.

[System.Reflection.Assembly]::LoadWithPartialName("assemblyname-goes-here")
What's the command to load an assembly in PowerShell at an arbitrary location?
[System.Reflection.Assembly]::LoadFile("full-file-path-goes-here")
How do you express bool values in PowerShell
$true and $false
How do you express null in PowerShell
$null
How do you declare parameters for a .ps1 script
Put the following as the first line of the file:

param($param1, $param2)

param([string] $rootpath, [string] $playlistpath)
How do you access an envionment variable in PowerShell?
$env:enivornment-variable-name-goes-here
How do you make a script parameter a required parameter?
Assign the default value of the parameter to $(throw "message to display")

e.g. param([string] $playlistpath=$(throw "Specify the path of a .asx playlist"))
What's the escape character within a string?
The back tick: `
How do you expand a variable within a string?
Within double quoted string, they're already expanded.

Within single quoted string, wrap it's usage in $()
Example: 'The value of the variable is $($somevariable)'
How do you perform string formatting?
With the -f switch.
Example "The value of some variable is {0}" -f $somevariable