https://github.com/felixfbecker/psopen
Open files and URLs from PowerShell
https://github.com/felixfbecker/psopen
powershell
Last synced: 5 months ago
JSON representation
Open files and URLs from PowerShell
- Host: GitHub
- URL: https://github.com/felixfbecker/psopen
- Owner: felixfbecker
- License: mit
- Created: 2018-09-25T15:38:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-25T15:39:58.000Z (over 7 years ago)
- Last Synced: 2025-06-02T11:50:20.121Z (9 months ago)
- Topics: powershell
- Language: PowerShell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSOpen
[](https://www.powershellgallery.com/packages/PSOpen)
[](https://www.powershellgallery.com/packages/PSOpen)
Module to open files and URLs from PowerShell with the default application. Works on Windows, Linux and macOS.
## Installation
```powershell
Install-Module PSOpen
```
## Usage
```powershell
# Open test.txt in the default text editor
Open-Item test.txt
# Open https://github.com in the default web browser
Open-Item https://github.com
# Open all files in the current directory
Get-ChildItem . | Open-Item
```
## Errors
Will write errors if an item could not be opened. Example:
```powershell
> Open-Item github.com
Open-Item : The file /Users/felix/src/github.com/felixfbecker/PSOpen/github.com does not exist. Perhaps you meant 'http://github.com'?
At line:1 char:1
+ Open-Item github.com
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Open-Item
```