PowerShell Logo Small

Invoke-Item



This is the built-in help made by Microsoft for the command 'Invoke-Item', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' 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 [-LiteralPath] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Include <string[]>] [-Confirm] [-Wh
atIf] [-UseTransaction] [<CommonParameters>]
Invoke-Item [-Path] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Include <string[]>] [-Confirm] [-WhatIf] [
-UseTransaction] [<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 p
rovider that provides access to the data.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=113345
about_Providers
Clear-Item
Get-Item
Move-Item
Set-Item
New-Item
Remove-Item
Rename-Item
Copy-Item

REMARKS

<

Examples


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

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



Description
-----------
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 --------------------------

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



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