click below
click below
Normal Size Small Size show me how
Powershell 7
Based on the Complete Guide to Powershell 7 on LinkedIn Learning
| Term | Definition |
|---|---|
| Get-Module | View currently loaded modules |
| Find-Module | Finds modules in a repository that match the specified criteria |
| Install-Module | Downloads one or more modules from a repository, and installs them on the local computer. |
| Get-InstalledModule | Gets a list of modules on the computer that were installed by PowerShellGet. |
| Update-Module | Downloads and installs the newest version of specified modules from an online gallery to the local computer. |
| Uninstall-Module | Uninstalls a module. |
| Import-Module -RequiredVersion | Specifies a version of the module to be added to the current session |
| Remove-Module | Unload modules from the current session |
| Import-Module -Force | Reload modules wit updated contenet |
| $_ or $PSItem | An automatic variable tat represents the current object in the pipeline. |
| Get-Item | Gets the item at the specified location. |
| Get-ChildItem | Gets the items and child items in one or more specified locations. |
| Env: | Access environment variables |
| New-Item | Creates a new item. |
| Set-Item Property | Creates or changes the value of a property of an item. |
| HKCU: | HKEY_CURRENT_USER |
| HKLM | HKEY_LOCAL_MACHINE |
| Get-Command | Gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. |
| Get-Help | Displays information about PowerShell commands and concepts. |
| Get-Process | Retrieves information about running processes |
| Select-Object | Selects objects or object properties. |
| Sort-Object | Sorts objects by property values. |
| Group-Object | Groups objects that contain the same value for specified properties. |
| Where-Object | Selects objects from a collection based on their property values. |
| Measure-Object | Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text. |
| Start-Process | Starts one or more processes on the local computer. |
| Stop-Process | Stops one or more running processes. |
| Get-Service | Gets the services on the computer. |
| Powershell Data Types | String, Integer, Float (32), Double (64), Decimal (128), Boolean, Array, Void, Null, and Custom Objects |
| Scope Precedence | local > private > script > global |
| Where-Object | Selects objects from a collection based on their property values. |
| ForEach-Object | Performs an operation against each item in a collection of input objects. |
| Select-Object | Selects objects or object properties. |
| Sort-Object | Sorts objects by property values. |
| ConvertTo-Json | Converts an object to a JSON-formatted string. |
| Export-Csv | Converts objects into a series of character-separated value (CSV) strings and saves the strings to a file. |
| ConvertTo-Xml | Creates an XML-based representation of an object. |
| Out-File | Sends output to a file. |
| ConvertFrom-Json | Converts a JSON-formatted string to a custom object or a hash table. |
| Import-Csv | Creates table-like custom objects from the items in a character-separated value (CSV) file. |
| ValidateSet | An attribute declaration that restricts arguments to predefined values |
| ValidateRange | An attribute declaration that restricts arguments to a predefined range of values |