Windows PowerShell Utility Cmdlets

Applies To: Windows PowerShell 5.0

This section contains the help topics for the cmdlets that are installed with Windows PowerShell Microsoft.PowerShell.Utility module. The Utility module contains cmdlets that manage the basic features of Windows PowerShell.

Utility Cmdlets

Name Description

Add-Member

Adds a user-defined custom member to an instance of a Windows PowerShell object.

Add-Type

Adds a .NET type (a class) to a Windows PowerShell session.

Clear-Variable

Deletes the value of a variable.

Compare-Object

Compares two sets of objects.

ConvertFrom-Csv

Converts object properties in CSV format into CSV versions of the original objects.

ConvertFrom-Json

Converts a JSON-formatted string to a custom object.

ConvertFrom-StringData

Converts a string containing one or more "name=value" pairs to a hash table.

ConvertTo-Csv

Converts .NET objects into a series of comma-separated, variable-length (CSV) strings.

ConvertTo-Html

Converts .NET objects into HTML that can be displayed in a Web browser.

ConvertTo-Json

Converts an object to a JSON-formatted string.

ConvertTo-Xml

Creates an XML-based representation of an object.

Disable-PSBreakpoint

Disables the breakpoints in the current console.

Enable-PSBreakpoint

Enables the breakpoints in the current console.

Export-Alias

Exports information about currently-defined aliases to a file.

Export-Clixml

Creates an XML-based representation of an object or objects and stores it in a file.

Export-Csv

Converts .NET objects into a series of comma-separated, variable-length (CSV) strings and saves the strings in a CSV file.

Export-FormatData

Saves formatting data from the current session in a formatting file.

Export-PSSession

Saves commands from another session in a module file.

Format-Custom

Uses a customized view to format the output.

Format-List

Formats the output as a list of properties in which each property appears on a new line.

Format-Table

Formats the output as a table.

Format-Wide

Formats objects as a wide table that displays only one property of each object.

Get-Alias

Gets the aliases for the current session.

Get-Culture

Gets the culture currently set in the operating system.

Get-Date

Gets the current date and time.

Get-Event

Gets the events in the event queue.

Get-EventSubscriber

Gets the event subscribers in the current session.

Get-FileHash

Gets the hash value for a file by using a specified hash algorithm.

Get-FormatData

Gets the formatting data in the current session.

Get-Host

Gets an object that represents the current host program.

Get-Member

Gets the properties and methods of objects.

Get-PSBreakpoint

Gets the breakpoints set in the current console.

Get-PSCallStack

Displays the current call stack.

Get-Random

Gets a random number or selects objects randomly from a collection.

Get-TraceSource

Gets the Windows PowerShell components that are instrumented for tracing.

Get-TypeData

Gets the extended type data in the current session.

Get-UICulture

Gets the current user interface culture set in the operating system.

Get-Unique

Returns the unique items from a sorted list.

Get-Variable

Gets the variables in the current console.

Group-Object

Groups objects that contain the same value for specified properties.

Import-Alias

Imports an alias list from a file.

Import-Clixml

Imports a CLIXML file and creates corresponding objects within Windows PowerShell.

Import-Csv

Converts object properties in a CSV file into CSV versions of the original objects.

Import-LocalizedData

Imports language-specific data into scripts and functions based on the current culture setting of the operating system.

Import-PSSession

Imports cmdlets, aliases, functions, and other command types from another session on a local or remote computer into the current session.

Invoke-Expression

Runs commands or expressions on the local computer.

Invoke-RestMethod

Sends an HTTP or HTTPS request to a REST-compliant web service.

Invoke-WebRequest

Sends an HTTP or HTTPS request to a web service.

Measure-Command

Measures the time it takes to run script blocks and cmdlets.

Measure-Object

Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as the text in files.

New-Alias

Creates a new alias.

New-Event

Creates a new event.

New-Object

Creates an instance of a .Net or COM object.

New-TimeSpan

Creates an object that represents a time interval.

New-Variable

Creates a new variable.

Out-File

Sends output to a file.

Out-GridView

Sends output to an interactive table in a separate window.

Out-Printer

Sends output to a printer.

Out-String

Sends objects to the host as a series of strings.

Read-Host

Reads a line of input from the console.

Register-EngineEvent

Subscribes to events that are generated by the Windows PowerShell engine and by the New-Event cmdlet.

Register-ObjectEvent

Subscribes to the events that are generated by a .NET object.

Remove-Event

Deletes events from the event queue.

Remove-PSBreakpoint

Deletes breakpoints from the current console.

Remove-TypeData

Deletes extended types from the current session.

Remove-Variable

Deletes a variable and its value.

Select-Object

Selects specified properties of an object or set of objects. It can also select unique objects from an array of objects or it can select a specified number of objects from the beginning or end of an array of objects.

Select-String

Finds text in strings and files.

Select-Xml

Finds text in an XML document.

Send-MailMessage

Sends an e-mail message.

Set-Alias

Creates or changes an alias (alternate name) for a cmdlet or command element.

Set-Date

Changes the system time on the computer to a time that you specify.

Set-PSBreakpoint

Sets a breakpoint on a line, command, or variable.

Set-TraceSource

Configures, starts, and stops a trace of Windows PowerShell components.

Set-Variable

Sets the value of a variable. Creates the variable if one with the requested name does not exist.

Show-Command

Creates Windows PowerShell commands in a graphical command window.

Sort-Object

Sorts objects by property values.

Start-Sleep

Suspend shell, script, or runspace activity for the specified period of time.

Tee-Object

Saves command output in a file or variable and displays it in the console.

Trace-Command

Configures and starts a trace of the specified expression or command.

Unblock-File

Unblocks files that were downloaded from the Internet.

Unregister-Event

Cancels an event subscription.

Update-FormatData

Updates and appends format data files.

Update-List

Adds and removes items from a property value that contains a collection of objects.

Update-TypeData

Updates the extended type data in the session.

Wait-Event

Waits until a particular event is raised before continuing to run.

Write-Debug

Writes a debugging message to the console.

Write-Error

Writes an object to the error pipeline.

Write-Host

Writes customized output to a host.

Write-Output

Sends the objects to the next command in the pipeline. If the command is the last in the pipeline, the objects are displayed on the console.

Write-Progress

Displays a progress bar within a Windows PowerShell command window.

Write-Verbose

Writes text to the verbose message stream in Windows PowerShell.

Write-Warning

Writes a warning message.