PowerShell Logo Small

Invoke-Item



This is the built-in help made by Microsoft for the command 'Invoke-Item', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Performs the default action on the specified item.

SYNTAX


Invoke-Item [-Path] <String[]> [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Include [<String[]>]] [-InformationAction {SilentlyContinue |
Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Confirm] [-WhatIf] [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]
Invoke-Item [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Include [<String[]>]] [-InformationAction {SilentlyContinue | Stop | Continue |
Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -LiteralPath <String[]> [-Confirm] [-WhatIf] [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Invoke-Item cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with
the document file type. The default action depends on the type of item and is determined by the Windows PowerShell provider that provides access to the data.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=290506
Clear-Item
Copy-Item
Get-Item
Invoke-Command
Move-Item
New-Item
Remove-Item
Rename-Item
Set-Item
about_Providers

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>invoke-item C:\Test\aliasApr04.doc



This command opens the file aliasApr04.doc in Microsoft Office Word. In this case, opening in Word is the default action for .doc files.










-------------------------- EXAMPLE 2 --------------------------

PS C:\>invoke-item "C:\Documents and Settings\Lister\My Documents\*.xls"



This command opens all of the Microsoft Office Excel spreadsheets in the C:\Documents and Settings\Lister\My Documents folder. Each spreadsheet is opened in a new instance
of Excel. In this case, opening in Excel is the default action for .xls files.