What is the use of -Force parameter in Get-ChildItem in PowerShell?

To display files along with hidden files, you need to use –Force parameter.


Get-ChildItem D:\Temp\ -Force


If you see the above output, hiddenfile.xlsx is the hidden file and same can be identified with the mode where –a-h—attribute of the file.

You can also use this parameter with –Recurse or –Depth.

Get-ChildItem D:\Temp\ -Recurse -Force