核心 (Core)
Ohter
Get-Command, gcm, Gets all commands.Out-Default, Sends the output to the default formatter and to the default output cmdlet.Out-Null, Hides the output instead of sending it down the pipeline or displaying it.Register-ArgumentCompleter, Registers a custom argument completer.Set-StrictMode, Establishes and enforces coding rules in expressions, scripts, and script blocks.
Help
Getting Detailed Help Information | Microsoft Docs
about_Comment_Based_Help | Microsoft Docs
about_Command_Syntax | Microsoft Docs
about_Parameters | Microsoft Docs
Get-Help, -?, Displays information about PowerShell commands and concepts.Update-Help, Downloads and installs the newest help files on your computer.Save-Help, Downloads and saves the newest help files to a file system directory.help, man,Get-Help
History
about_History | Microsoft Docs
Get-History, h, history, ghy, Gets a list of the commands entered during the current session.Add-History, Appends entries to the session history.Clear-History, clhy, Deletes entries from the PowerShell command history.Invoke-History, ihy, Runs commands from the session history.
Host
[Clear-Host](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/clear-host)fun, cls, clear, Clears the display in the host program.Out-Host, oh, Sends output to the command line.
Collection
about_Comparison_Operators | Microsoft Docs
ForEach-Object, %, foreach, Performs an operation against each item in a collection of input objects.Where-Object, ?, where, Selects objects from a collection based on their property values.
Job
about_Jobs | Microsoft Docs
about_Job_Details | Microsoft Docs
about_Remote_Jobs | Microsoft Docs
Start-Job, sajb,Starts a PowerShell background job.Get-Job, gjb,Starts a PowerShell background job.Receive-Job, rcjb,Gets the results of the PowerShell background jobs in the current session.Stop-Job, spjb,Stops a PowerShell background job.Wait-Job, wjb,Suppresses the command prompt until one or all of the PowerShell background jobs running in the session are completed.Remove-Job, rjb,Deletes a PowerShell background job.Debug-Job, Debugs a running background, remote, or PowerShell Workflow job.Invoke-Command, icm,Runs commands on local and remote computers.
Module
about_Modules | Microsoft Docs
Get-Module, gmo,Gets the modules that have been imported or that can be imported into the current session.New-Module, nmo,Creates a new dynamic module that exists only in memory.Import-Module, ipmo,Adds modules to the current session.Remove-Module, rmo,Removes modules from the current session.Export-ModuleMember, Specifies the module members that are exported.New-ModuleManifest, Creates a new module manifest.Test-ModuleManifest, Verifies that a module manifest file accurately describes the contents of a module.
PSSession
about_PSSessions | Microsoft Docs
about_PSSession_Details | Microsoft Docs
about_Remote_Disconnected_Sessions | Microsoft Docs
about_Session_Configurations | Microsoft Docs
about_Session_Configuration_Files | Microsoft Docs
Get-PSSession, gsn, Gets the PowerShell sessions on local and remote computers.Enter-PSSession, etsn, Starts an interactive session with a remote computer.Exit-PSSession, exsn, Ends an interactive session with a remote computer.Connect-PSSession, cnsn, Reconnects to disconnected sessions.Disconnect-PSSession, dnsn, Disconnects from a session.New-PSSession, nsn, Creates a persistent connection to a local or remote computer.Remove-PSSession, rsn, Closes one or more PowerShell sessions (PSSessions).Receive-PSSession, rcsn, Gets results of commands in disconnected sessions.New-PSSessionOption, Creates an object that contains advanced options for a PSSession.Get-PSSessionCapability, Gets the capabilities of a specific user on a constrained session configuration.Get-PSSessionConfiguration, Gets the registered session configurations on the computer.Set-PSSessionConfiguration, Changes the properties of a registered session configuration.Enable-PSSessionConfiguration, Enables the session configurations on the local computer.Disable-PSSessionConfiguration, Disables session configurations on the local computer.Register-PSSessionConfiguration, Creates and registers a new session configuration.Unregister-PSSessionConfiguration, Deletes registered session configurations from the computer.New-PSSessionConfigurationFile, Creates a file that defines a session configuration.Test-PSSessionConfigurationFile, Verifies the keys and values in a session configuration file.Remoting
Enable-PSRemoting, Configures the computer to receive remote commands.Disable-PSRemoting, Prevents remote users from running commands in PowerShell on the local computer.
HostProcess
Get-PSHostProcessInfo, Gets process information about the PowerShell host.Enter-PSHostProcess, Connects to and enters into an interactive session with a local process.Exit-PSHostProcess, Closes an interactive session with a local process.
ExperimentalFeature
Get-ExperimentalFeature, Gets experimental features.Enable-ExperimentalFeature, Enable an experimental feature on startup of new instance of PowerShell.Disable-ExperimentalFeature, Disable an experimental feature on startup of new instance of PowerShell.
工具 (Utility)
Alias
about_Aliases | Microsoft Docs
about_Alias_Provider | Microsoft Docs
AliasInfo Class (System.Management.Automation) | Microsoft Docs
Get-Alias, gal, Gets the aliases for the current session.New-Alias, nal, Creates a new alias.Set-Alias, sal, Creates or changes an alias for a cmdlet or other command in the current PowerShell session.Remove-Alias, Remove an alias from the current session.Export-Alias, epal, Exports information about currently defined aliases to a file.Import-Alias, ipal, Imports an alias list from a file.
Variable
about_Variables | Microsoft Docs
about_Automatic_Variables | Microsoft Docs
about_Preference_Variables | Microsoft Docs
about_Environment_Variables | Microsoft Docs
Get-Variable, gv, Gets the variables in the current console.New-Variable, nv, Creates a new variable.Set-Variable, sv, set, Sets the value of a variable. Creates the variable if one with the requested name does not exist.Remove-Variable, rv, Deletes a variable and its value.Clear-Variable, clv, Deletes the value of a variable.
Member
Get-Member, gm, Gets the properties and methods of objects.Add-Member, Adds custom properties and methods to an instance of a PowerShell object.
Object
Compare-Object, diff, compare, Compares two sets of objects.Group-Object, group, Groups objects that contain the same value for specified properties.Measure-Object, measure, Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.New-Object, Creates an instance of a Microsoft .NET Framework or COM object.Select-Object, select, Selects objects or object properties.Sort-Object, sort, Selects objects or object properties.Tee-Object, tee, Saves command output in a file or variable and also sends it down the pipeline.Get-Unique, gu, Returns unique items from a sorted list.
String
Join-String, Combines objects from the pipeline into a single string.Out-String, Sends objects to the host as a series of strings.Select-String, sls, Finds text in strings and files.
File
Out-File, Sends output to a file.New-TemporaryFile, Creates a temporary file.Get-FileHash, Computes the hash value for a file by using a specified hash algorithm.Unblock-File, Unblocks files that were downloaded from the Internet.
Csv, Json, Xml, Html, Markdown
ConvertFrom-Csv, Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.ConvertTo-Csv, Converts objects into a series of character-separated value (CSV) strings.Export-Csv, epcsv, Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.Import-Csv, ipcsv, Creates table-like custom objects from the items in a comma-separated value (CSV) file.ConvertFrom-Json, Converts a JSON-formatted string to a custom object or a hash table.ConvertTo-Json, Converts an object to a JSON-formatted string.Test-Json, Tests whether a string is a valid JSON document.ConvertTo-Xml, Creates an XML-based representation of an object.Select-Xml, Finds text in an XML string or document.Export-Clixml, Creates an XML-based representation of an object or objects and stores it in a file.Import-Clixml, Imports a CLIXML file and creates corresponding objects in PowerShell.ConvertTo-Html, Converts Microsoft .NET Framework objects into HTML that can be displayed in a Web browser.ConvertFrom-Markdown, Convert the contents of a string or a file to a MarkdownInfo object.Get-MarkdownOption,Set-MarkdownOption,Show-Markdown,
Host
Get-Host, Gets an object that represents the current host program.Read-Host, Reads a line of input from the console.Write-Host, Writes customized output to a host.Write-Information, Specifies how PowerShell handles information stream data for a command.
PSSession
about_PSSessions | Microsoft Docs
about_PSSession_Details | Microsoft Docs
Export-PSSession, Exports commands from another session and saves them in a PowerShell module.Import-PSSession, Imports commands from another session into the current session.
Extended type data
about_Types.ps1xml | Microsoft Docs
Get-TypeData, Gets the extended type data in the current session.Update-TypeData, Updates the extended type data in the session.Remove-TypeData, Deletes extended types from the current session.
Formatting data
about_Format.ps1xml | Microsoft Docs
Get-FormatData, Gets the formatting data in the current session.Update-FormatData, Updates the formatting data in the current session.Export-FormatData, Saves formatting data from the current session in a formatting file.
Format
Using Format Commands to Change Output View | Microsoft Docs
Format-Table, ft, Formats the output as a table.Format-Wide, fw, Formats objects as a wide table that displays only one property of each object.Format-List, fl, Formats the output as a list of properties in which each property appears on a new line.Format-Custom, fc, Uses a customized view to format the output.Format-Hex, fhx, Displays a file or other input as hexadecimal.
Culture
Get-Culture, Gets the current culture set in the operating system.Get-UICulture, Gets the current UI culture settings in the operating system.
Date
Get-Date, Gets the current date and time.Set-Date, Changes the system time on the computer to a time that you specify.New-TimeSpan, Creates a TimeSpan object.
Random
Get-Random, Gets a random number, or selects objects randomly from a collection.
Web
Invoke-RestMethod, irm, Sends an HTTP or HTTPS request to a RESTful web service.Invoke-WebRequest, iwr, Gets content from a web page on the Internet.Send-MailMessage, Sends an email message.
Event
Get-Event, Gets the events in the event queue.New-Event, Creates a new event.[Remove-Event](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/remove-event), Deletes events from the event queue.[Wait-Event](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/wait-event), Waits until a particular event is raised before continuing to run.Get-EventSubscriber, Gets the event subscribers in the current session.Register-EngineEvent, Subscribes to events that are generated by the PowerShell engine and by the New-Event cmdlet.Register-ObjectEvent, Subscribes to the events that are generated by a Microsoft .NET Framework object.Unregister-Event, Cancels an event subscription.
Trace
Trace-Command, Configures and starts a trace of the specified expression or command.Measure-Command, Measures the time it takes to run script blocks and cmdlets.Get-TraceSource, Gets PowerShell components that are instrumented for tracing.Set-TraceSource, Configures, starts, and stops a trace of PowerShell components.
Debugger
about_Debuggers | Microsoft Docs
Get-PSBreakpoint, gbp, Gets the breakpoints that are set in the current session.Set-PSBreakpoint, sbp, Sets a breakpoint on a line, command, or variable.[Remove-PSBreakpoint](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/remove-psbreakpoint), rbp, Deletes breakpoints from the current console.[Enable-PSBreakpoint](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/enable-psbreakpoint), ebp, Enables the breakpoints in the current console.Disable-PSBreakpoint, dbp, Disables the breakpoints in the current console.Get-PSCallStack, gcs, Displays the current call stack.Wait-Debugger, Stops a script in the debugger before running the next statement in the script.Write-Verbose, Writes text to the verbose message stream.Write-Debug, Writes a debug message to the console.Write-Warning, Writes a warning message.Write-Error, Writes an object to the error stream.Write-Output, echo, write, Sends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline, the objects are displayed in the console.Write-Progress, Displays a progress bar within a PowerShell command window.
RunSpace
Get-Runspace, Gets active runspaces within a PowerShellhost process.Debug-Runspace, Starts an interactive debugging session with a runspace.Get-RunspaceDebug, Shows runspace debugging options.Enable-RunspaceDebug, Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.Disable-RunspaceDebug, Disables debugging on one or more runspaces, and releases any pending debugger stop.
Other
Add-Type, Adds a Microsoft .NET Core type (a class) to a PowerShell session.Get-Uptime, Get the TimeSpan since last boot.Get-Verb, Gets approved PowerShell verbs.Invoke-Expression, iex, Runs commands or expressions on the local computer.New-Guid, Creates a GUID.Start-Sleep, sleep, Suspends the activity in a script or session for the specified period of time.
Unknown
- ConvertFrom-SddlString
- ConvertFrom-StringData
- Import-LocalizedData
- Import-PowerShellDataFile
Management
Microsoft.PowerShell.Management
Content
Get-Content, cat, type, gc, Gets the content of the item at the specified location.Set-Content, Writes new content or replaces existing content in a file.Add-Content, ac, Adds content to the specified items, such as adding words to a file.Clear-Content, cls, Deletes the contents of an item, but does not delete the item.
Item
Get-Item, gi, Gets the item at the specified location.Set-Item, si, Changes the value of an item to the value specified in the command.Clear-Item, cli, Clears the contents of an item, but does not delete the item.New-Item, ni, Creates a new item.Remove-Item, del, rm, rd, erase, rmdir, ri, Deletes the specified items.Rename-Item, ren, rni, Renames an item in a PowerShell provider namespace.Copy-Item, cp, copy, cpi, Copies an item from one location to another.Move-Item, mv, move, mi, Moves an item from one location to another.Invoke-Item, ii, Performs the default action on the specified item.mkdir, md,New-Item -Type Directory
ChildItem
Get-ChildItem, dir, ls, gci, Gets the items and child items in one or more specified locations.
ItemProperty
Get-ItemProperty, gp, Gets the properties of a specified item.Get-ItemPropertyValue, gpv, Gets the value for one or more properties of a specified item.Set-ItemProperty,sp, Creates or changes the value of a property of an item.Clear-ItemProperty, clp, Clears the value of a property but does not delete the property.Rename-ItemProperty, rnp, Renames a property of an item.New-ItemProperty, Creates a new property for an item and sets its value.Remove-ItemProperty, rp, Deletes the property and its value from an item.Copy-ItemProperty, cpp, Copies a property and value from a specified location to another location.Move-ItemProperty, mp, Moves a property from one location to another.
Location
Get-Location, pwd, gl, Gets information about the current working location or a location stack.Set-Location, cd , chdir, sl, Sets the current working location to a specified location.Pop-Location, popd, Changes the current location to the location most recently pushed onto the stack.Push-Location, pushd, Adds the current location to the top of a location stack.
cd - returns to previous directory; cd and cd -- change to $HOME; some other similar: cd\, cd \, cd ~.
Path
Test-Path, Determines whether all elements of a path exist.Convert-Path, cvpa, Converts a path from a PowerShell path to a PowerShell provider path.Join-Path, Combines a path and a child path into a single path.Resolve-Path, rvpa, Resolves the wildcard characters in a path, and displays the path contents.Split-Path, Returns the specified part of a path.
PSDrive
Get-PSDrive, gdr, Gets drives in the current session.New-PSDrive, mount, ndr, Creates temporary and persistent mapped network drives.Remove-PSDrive, rdr, Deletes temporary PowerShell drives and disconnects mapped network drives.
PSProvider
about_Providers | Microsoft Docs
about_Alias_Provider | Microsoft Docs
about_FileSystem_Provider | Microsoft Docs
about_Environment_Provider | Microsoft Docs
about_Function_Provider | Microsoft Docs
about_Registry_Provider | Microsoft Docs
about_Variable_Provider | Microsoft Docs
about_WSMan_Provider | Microsoft Docs (microsoft.wsman.management)
about_Certificate_Provider | Microsoft Docs (microsoft.powershell.security)
Get-PSProvider, Gets information about the specified PowerShell provider.
Process
Get-Process, ps, gps, Gets the processes that are running on the local computer.Start-Process, start, saps, Starts one or more processes on the local computer.Stop-Process, kill, spps, Stops one or more running processes.Wait-Process, Waits for the processes to be stopped before accepting more input.Debug-Process, Debugs one or more processes running on the local computer.
Service
Get-Service, gsv, Gets the services on the computer.New-Service, Creates a new Windows service.Remove-Service, Removes a Windows service.Set-Service, Starts, stops, and suspends a service, and changes its properties.Start-Service, sasv, Starts one or more stopped services.Stop-Service, spsv, Stops one or more running services.Suspend-Service, Suspends (pauses) one or more running services.Resume-Service, Resumes one or more suspended (paused) services.Restart-Service, Stops and then starts one or more services.
Computer
Get-ComputerInfo, gin,Gets a consolidated object of system and operating system properties.Rename-Computer, Renames a computer.Restart-Computer, Restarts the operating system on local and remote computers.Stop-Computer, Stops (shuts down) local and remote computers.
TimeZone
Get-TimeZone, gtz,Gets the current time zone or a list of available time zones.Set-TimeZone, stz,Sets the system time zone to a specified time zone.
Net
Test-Connection, Sends ICMP echo request packets (“pings”) to one or more computers.
PowerShellGet
PowerShellGet
该模块下的所有命令都是函数
Module
Find-Commandfun, Finds PowerShell commands in modules.Find-Modulefun, Finds modules in a repository that match specified criteria.Find-RoleCapabilityfun, Finds role capabilities in modules.Get-InstalledModulefun, Gets a list of modules on the computer that were installed by PowerShellGet.Install-Modulefun, Downloads one or more modules from a repository, and installs them on the local computer.Publish-Modulefun, Publishes a specified module from the local computer to an online gallery.Save-Modulefun, Saves a module and its dependencies on the local computer but doesn’t install the module.Uninstall-Modulefun, Uninstalls a module.Update-Modulefun, Downloads and installs the newest version of specified modules from an online gallery to the local computer.Update-ModuleManifestfun, Updates a module manifest file.
Script
Find-Scriptfun, Finds a script.Get-InstalledScriptfun, Gets an installed script.Install-Scriptfun, Installs a script.Publish-Scriptfun, Publishes a script.Save-Scriptfun, Saves a script.Uninstall-Scriptfun, Uninstalls a script.Update-Scriptfun, Updates a script.New-ScriptFileInfofun, Creates a script file with metadata.Test-ScriptFileInfofun, Validates a comment block for a script.Update-ScriptFileInfofun, Updates information for a script.
PSRepository
Get-PSRepositoryfun, Gets PowerShell repositories.Register-PSRepositoryfun, Registers a PowerShell repository.Set-PSRepositoryfun, Sets values for a registered repository.Unregister-PSRepositoryfun, Unregisters a repository.
Other
Find-DscResourcefun, Finds Desired State Configuration (DSC) resources.
*GraphicalTools
需要额外安装
Out-GridView Returns | PowerShell
PowerShell/GraphicalTools: A module that mixes PowerShell and GUIs! - built on Avalonia
PowerShell Gallery | Microsoft.PowerShell.GraphicalTools 0.2.0
Out-GridView,
Windows 10 and Windows Server 2016
Dism
Use DISM in Windows PowerShell | Microsoft Docs
DISM - Microsoft Docs
