Search notes:

PowerShell cmdLet Get-Item

Mode

Among others get-item prints a Mode column:
PS C:\Users\Rene> get-item foo.txt
   …
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-ar---        23.11.2021     21:32          11669 foo.txt
The value of mode consists of up to six characters or dashes. A dash indicates that the corresponding item does not have an attribute while the character indicates the presence of the attribute.
The characters have following meaning, from left to right:
d Directory
a Archive
r Read-only
h Hidden
s System
l Reparse Point
These attributes correspond to a subset of the attributes listed in the System.IO.FileAttributes enumeration.

Returned types

The .NET type that is returned by get-item depends on the thing that get-item gets.
Item Class
File system directory System.IO.DirectoryInfo
File System file TODO
Registry key Microsoft.Win32.RegistryKey
TODO

Getting an item's parent item

If the item is a directory:
(get-item $env:temp).parent
(get-item $env:temp).parent.fullName
If the item is a file:
(get-item $profile).directory
(get-item $profile).directory.fullkame

See also

get-childItem
The method GetItem() in System.Management.Automation.Provider.ItemCmdletProvider.
The command parameter -credential.
Powershell command noun: item

Index