PowerShell Basics
Useful Symbols
% Foreach-Object
? Where-Object
$_ The variable for the current value in the pipe line
Examples
1,2,3 | %{ write-host $_ } will print 1,2,3
1,2,3 | ?{$_ -gt 1} will print 2,3Language Mode
$ExecutionContext.SessionState.LanguageModeExecution Policy
Several ways to bypass
powershell -ExecutionPolicy bypass
powershell -c <cmd>
powershell -encodedcommand
$env:PSExecutionPolicyPreference="bypass" Load PowerShell script
Import a module
List available module commands
Download files
more options
PowerShell v3+
Download and store
Port Forward
Last updated
Was this helpful?