Get-Item
Get one file, folder, or item
Get-Item -Path .\notes.txt
- Works on
- WindowsLinuxmacOS
- PowerShell
- 5.1 and later
- Reference
- Microsoft Learn: Get-Item
Gets the item itself. Get-ChildItem lists what is inside a folder. Get-Item .\docs is the folder object. Get-ChildItem .\docs is the contents.
Try this
Get-Item -Path .\notes.txt | Format-List *