1/81
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Debug db
Displays programmer-level detail about the operation done by the command for troubleshooting
ErrorAction ea
Determines how the cmdlet responds to a non-terminating error (Continue, Stop, SilentlyContinue, Inquire, Ignore, Break, Suspend)
ErrorVariable ev
Stores error messages from the command in the specified variable in addition to $Error
InformationAction infa
Determines how the cmdlet responds to information messages from Write-Information
InformationVariable iv
Stores information messages from the command in the specified variable
OutVariable ov
Stores output objects from the command in the specified variable in addition to sending output along the pipeline
OutBuffer ob
Determines the number of objects to accumulate in a buffer before sending them through the pipeline
PipelineVariable pv
Stores the current pipeline element as a variable that can be accessed by downstream commands
ProgressAction proga
Determines how PowerShell responds to progress updates like progress bars (added in PowerShell 7.4)
Verbose vb
Displays detailed information about the operation done by the command
WarningAction wa
Determines how the cmdlet responds to a warning message
WarningVariable wv
Stores warning messages from the command in the specified variable
WhatIf wi
Displays a message describing what would happen if the command executes, without actually executing it
Confirm cf
Prompts you for confirmation before executing the command
Get-Process -Debug
Shows debugging messages if the cmdlet generates them
Get-Process -Debug:$false
Suppresses debugging messages even if $DebugPreference is set
Continue
Displays the error message and continues executing (default)
Stop
Displays the error message and stops executing
SilentlyContinue
Suppresses the error message and continues executing
Inquire
Displays the error message and prompts for confirmation before continuing
Ignore
Suppresses the error message and doesn't add it to $Error variable
Break
Enters the debugger when an error occurs
Get-Process -ErrorVariable myErrors
Stores errors in $myErrors variable
Get-Process -ErrorVariable +myErrors
Appends errors to existing $myErrors variable
SilentlyContinue
Information messages are not displayed (default)
Continue
Displays information messages and continues
Stop
Stops execution when Write-Information is encountered
Inquire
Displays information message and asks if you want to continue
Ignore
Completely ignores information messages
Get-Process -OutVariable procs
Stores process objects in $procs variable
Get-Process -OutVariable +procs
Appends process objects to existing $procs variable
Get-ChildItem -PipelineVariable file | GetContent
Stores each file object in $file variable for access in downstream
commands
Get-Process -Verbose
Shows verbose messages if the cmdlet generates them
Get-Process -Verbose
$false
Suppresses verbose messages even if $VerbosePreference is set
Continue
Displays warning messages and continues (default)
Stop
Displays warning message and stops
SilentlyContinue
Suppresses warning messages and continues
Inquire
Displays warning and prompts for confirmation
Remove-Item file.txt -WhatIf
Shows what would be removed without actually removing it
New-Item test.txt -WhatIf
Shows what would be created without actually creating it
Remove-Item *.txt -Confirm
Prompts for confirmation before removing each file
Remove-Item file.txt -Confirm:$false
Suppresses confirmation prompts
Yes Y
Perform the action
Yes to All A
Perform all actions and suppress subsequent confirmation prompts
No N
Don't perform the action
No to All L
Don't perform any actions and suppress subsequent confirmation prompts
Suspend S
Pause the command and create a temporary nested session
Help ?
Display help for the confirmation options
Path
Specifies the path to a location
LiteralPath
Specifies a path where wildcards are not interpreted
Filter
Specifies a filter to qualify the Path parameter
Include
Specifies items to include in the operation
Exclude
Specifies items to exclude from the operation
Recurse
Performs the operation on items in subcontainers
Force
Forces the command to run without asking for user confirmation or overrides restrictions
ItemType
Specifies the type of item to create (File, Directory, SymbolicLink, etc.)
Property
Specifies object properties to select or display
Name
Specifies the name of an object
Value
Specifies a value to assign
InputObject
Specifies objects to process via parameter instead of pipeline
PassThru
Returns an object representing the item worked with (many cmdlets don't output by default)
First
Gets only the first specified number of objects
Last
Gets only the last specified number of objects
Skip
Skips the first specified number of objects
Unique
Returns only unique objects
Where
Specifies a filter expression
Sort
Sorts objects by property values
ComputerName
Specifies one or more remote computers
Credential
Specifies a user account with permission to perform the action
Session
Specifies a PSSession to use for the command
AsJob
Runs the command as a background job
Delimiter
Specifies a delimiter to separate values
Encoding
Specifies the file encoding (UTF8, ASCII, Unicode, etc.)
NoTypeInformation
Omits type information header from CSV output
Width
Specifies the width of output
Parameter Aliases
Most parameters have short aliases to reduce typing (e.g., -ea for -ErrorAction)
Switch Parameters
Parameters that don't require a value act as boolean flags (e.g., -Recurse)
Positional Parameters
Some parameters can be used without the parameter name if in the correct position
Tab Completion
Press Tab after typing a dash (-) to cycle through available parameters
Parameter Sets
Some cmdlets have different groups of parameters that can't be used together
Preference Variables
Common parameters override preference variables like $ErrorActionPreference