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

PowerShellMicrosoft TechnologiesSoftware & Coding

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

Command

Get-ChildItem D:\Temp\ -Force

Output

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
raja
Published on 23-Jan-2020 07:41:17
Advertisements