How can I make Get-ChildItem show hidden and system files?

August 4, 2026 3 answers
Asked by MellowPine47
I know that `Get-ChildItem` normally lists regular files, while `Get-ChildItem -Hidden` limits the results to hidden items. In the traditional Windows directory command, `dir /a` displays everything, including hidden and system files. What is the PowerShell equivalent of `dir /a`?

Answers

CrispRiver8
Use the `-Force` switch: ```powershell Get-ChildItem -Force ``` This includes items that are normally hidden, such as hidden and system files. It does not bypass file-system permissions.
Reply to this answer
AmberKoala62
`-Force` can be a little unintuitive because it often suggests bypassing confirmations in other commands. For `Get-ChildItem`, its purpose is to include items that are normally omitted, especially hidden and system files. You can check the details with: ```powershell Get-Help Get-ChildItem -Full ```
Reply to this answer
NiftyCloud3
The common aliases work the same way, so you can also use: ```powershell gci -Force ``` For comparison, `Get-ChildItem -Hidden` shows only hidden items, while `Get-ChildItem -Force` includes hidden and system items along with the regular results.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions