command-line_in_powershell

Command-line in PowerShell

Return to PowerShell, Windows PowerShell, PowerShell for Linux, Command-line interface, choco list --localonly, Chocolatey

SS64 How-to An A-Z Index of Windows PowerShell commands

       %                     Alias for ForEach-Object
       ?                     Alias for Where-Object

A

F

  -F operator                Format operator.
  Unblock-File               Unblock files downloaded from the Internet.
  * [[Get-FileHash           Compute the hash value for a file.
  ForEach-Object    foreach  Loop through each item in the pipeline ( % ).
  ForEach                    Loop through each item in a collection.
  ForEach method             Loop through each item in a collection.
  For                        Loop through items that match a condition.
  Format-Custom         fc   Format output using a customized view.
  Format-Hex            fhx  Display a file or other input as hexadecimal.
  Format-List           fl   Format output as a list of properties, each on a new line.
  Format-Table          ft   Format output as a table.
  Format-Wide           fw   Format output as a table listing one property only.
 Export-FormatData           Save formatting data from the current session.
* [[Get-FormatData       * [[Get the formatting data in the current session.
G

W

Invoke-WebRequest * Get content from a web page. Where-Object where/ - Compress or Extract zip files.

  • . (source) - Run a command script in the current shell.
  • & (call) - Run a command, script or function.
  • % - Alias for ForEach-Object.
  • – - %Stop parsing input.
  • ? - Alias for Where-Object.
  • $variable = “value” - Define a variable also: ${n!a#me} = “value”.
  • $_ - The current pipeline object.
  • @(…) - Force an expression to be evaluated as an array.
  • Escape or Continue on the next line.

The cmdlets above are listed in A-Z order, matching the Verb- and/or -Noun and/or Alias of the cmdlet (so some duplicates).

PowerShell can also run all the standard CMD commands (external commands), .cmd batch files will run within a CMD.exe shell (so can include internal CMD commands), plus all Resource Kit utilities. VBScripts can be run via cscript. [ Examples ]

Microsoft: PowerShell 5.1 cmdlets, 2.0/3.0 core cmdlets, Windows 2008 R2 cmdlets… more optional cmdlets.

Discussion forum - New!

See also: Websites, additional cmdlets, Utilities and Books for PowerShell.

Copyright © 1999-2021 SS64.com

Some rights reserved

Fair Use Sources

command-line_in_powershell.txt · Last modified: 2024/05/01 04:10 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki