- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get the system files using the Get-ChildItem in PowerShell?
System files are operating system files and are not visible by default using Get-ChildItem. To get the system files you need to use –System parameter.
Example
For example, below command will provide you system files and folders under C:\Windows\System32.
PS C:\WINDOWS\system32> Get-ChildItem -System
Output
Directory: C:\WINDOWS\system32 Mode LastWriteTime Length Name ---- ------------- ------ ---- d---s- 25-12-2019 01:14 AppV d---s- 19-03-2019 10:22 Configuration d---s- 23-12-2019 02:45 DiagSvcs d---s- 19-03-2019 11:50 dsc d---s- 19-03-2019 11:50 F12 d---s- 19-03-2019 10:23 Nui d---s- 19-03-2019 10:23 UNP
Command
You can also combine multiple parameters. For example, to get the system files which are readonly use command,
PS C:\WINDOWS\system32> Get-ChildItem –System –ReadOnly -Recurse
Output
Directory: C:\WINDOWS\system32\restore Mode LastWriteTime Length Name ---- ------------- ------ ---- -ar-s- 24-12-2019 23:40 76 MachineGuid.txt
Command
To get the system files that are hidden.
PS C:\WINDOWS\system32> Get-ChildItem –System –Hidden -Recurse
Output
Directory: C:\WINDOWS\system32\SMI\Store\Machine Mode LastWriteTime Length Name ---- ------------- ------ ---- -a-hs- 19-03-2019 10:07 0 SCHEMA.DAT.LOG1 -a-hs- 19-03-2019 10:07 8192 SCHEMA.DAT.LOG2 -a-hs- 25-12-2019 01:16 65536 SCHEMA.DAT{fd9a35e3-49fe-11e9-aa2c-248a07783950}.TM.blf -a-hs- 25-12-2019 01:16 524288 SCHEMA.DAT{fd9a35e3-49fe-11e9-aa2c-248a07783950}.TMContainer0000000000 0000000001.regtrans-ms -a-hs- 19-03-2019 13:11 524288 SCHEMA.DAT{fd9a35e3-49fe-11e9-aa2c-248a07783950}.TMContainer0000000000 0000000002.regtrans-ms
- Related Articles
- How to get the readonly files using Get-ChildItem in PowerShell?
- How to get only files but not the folders with Get-ChildItem using PowerShell?
- How to get only folders but not the files in the Get-ChildItem in PowerShell?
- How to list the subfolder contents using Get-ChildItem using PowerShell?
- How to use the -recursive parameter in Get-ChildItem using PowerShell?
- How to exclude specific file names using Get-ChildItem in PowerShell?
- How to use the wildcard character (*) in Get-ChildItem in PowerShell?
- How to control recursion in Get-ChildItem in PowerShell?
- How to use Depth pararmeter in Get-ChildItem PowerShell?
- How to retrieve specific file(s) information using Get-ChildItem in PowerShell?
- How to search for a specific extension using Get-ChildItem in PowerShell?
- How to exclude specific extension in Get-ChildItem in PowerShell?
- How to get the Azure storage container blobs (Files) using PowerShell?
- How to get hidden files and folders using PowerShell?
- What is Get-ChildItem cmdlet in PowerShell?

Advertisements