How to show hidden files with Get-ChildItem-Hidden-File with Windows PowerShell

Windows PowerShell has a number of commands to set syntax from the console. This system not only allows the use of this console, but it is also possible to download and install PowerShell in Linux to automate the processes. If you want to get the hidden files we recommend that you read this article with which you will learn how to show hidden files with Get-ChildItem-Hidden-File with Windows PowerShell  

What is Get-ChildItem?

Get-Childtem is a command defined for PowerShell which allows you to get items or children in one or more specific locations. An item refers to files or folders, while a path specifies a path or directory in the Windows file system.



'Get-ChildItem' cmdlet syntax and parameters

The syntax for 'Get-ChildItem' is as follows: Get-ChildItem –parameter argument1, -argument2 -parameter2 argument… Also, the parameters include: -recurse to get children in specific locations, -Path used to indicate location paths, -name to retrieve element names, among others.

How to show hidden files with Get-ChildItem-Hidden-File with Windows PowerShell

How to show hidden files with Get-ChildItem -Hidden -File with Windows PowerShell

It is important to note that Get-ChildItem does not allow viewing of hidden files by default in Windows PowerShell. However, you can use a parameter called '-Hidden away' which will allow you to show hidden files as well as '-Force'. To do this, follow the steps we explain below.

Accedi a Windows PowerShell

First, access Windows PowerShell from the system browser. Windows PowerShell allows you to perform various actions such as rename your computer or view installed programs from the console. To access this tool, type 'PowerShell' into the Windows search engine; If you can't download it to your computer, you need to get it from Microsoft's official site.



Immediately, you will see a new window that corresponds to the system console in where you can enter PowerShell commands with their respective parameters according to your needs. If you don't like the black background of the console, you can change the tool by inserting the transparent window in Windows 10.

Identify the '-Hidden' and '-File' parameters

For Windows PowerShell, the "-Hidden" parameter allows you to show only hidden files. This attribute can be abbreviated to the letters 'h' or 'ah'. By default, the 'Get-ChildItem' cmdlet does not show hidden items and in this circumstance you can add the '-Force' parameter.

For its part, the '-File' parameter is used to get a list of files and can be abbreviated with the letters 'af'.

Use the –Hidden parameter in Windows PowerShell

use the '-Hidden' parameter in Windows PowerShell you need to consider a specific directory to get an output. To do this, you need to write the following syntax in the console: Get-ChildItem -Hidden directory.

For example, if you want to show hidden files located in the "Documents" folder, you can type in Windows PowerShell: Get-ChildItem C: Users computer_name Documents -Hidden and press the "Enter" key. Replace ‘computer_name’ with the real name with which your computer is identified.


How to show hidden files with Get-ChildItem-Hidden-File with Windows PowerShell

Do I need the '-Files' parameter?

If you use the '-Hidden' parameter, Windows PowerShell will search for all hidden files in the directory you indicated in the console. In this sense, it is not allowed to use the 'Files' parameter at the same time as a syntax error will occur during the execution of the statement.

Alternative to show hidden files without using Get-ChildItem-Hidden-File with Windows PowerShell

Windows PowerShell allows you to use the '-Force' parameter to show hidden files. You just have to write the following syntax: Get-ChildItem -Force directory. Replace "Directory" with the exact location where you want to search for hidden files. You can replace the directory with the '.' (Without quotes) to get the list of all hidden folders in the system.


How to show hidden files of a specific extension?

to exhibit hidden files with a specific extension using Windows PowerShell, you can add the format as follows: Get –ChildItem C: Users computer_name Documents * .Ext -Hidden. Replace computer_name with your PC name and * .ext with the extension of the hidden files you want to show as * .docx, * .txt, * .pdf, among others. Press the "Enter" key and look at the output.

add a comment of How to show hidden files with Get-ChildItem-Hidden-File with Windows PowerShell
Comment sent successfully! We will review it in the next few hours.