Study your flashcards anywhere!

Download the official Cram app for free >

  • 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

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/10

Click to flip

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