Found 975 Articles for Software & Coding

How to get the system files using the Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:54:19

2K+ Views

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.ExampleFor example, below command will provide you system files and folders under C:\Windows\System32.PS C:\WINDOWS\system32> Get-ChildItem -SystemOutputDirectory: C:\WINDOWS\system32 Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d---s-       25-12-2019     01:14                AppV d---s-       19-03-2019     10:22           ... Read More

How to get the readonly files using Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:53:04

1K+ Views

To get the Readonly files with Get-ChildItem in PowerShell, you need to use the –Readonly files. Readonly file has attribute ‘r’.In the below example, you can check the attribute of the file.Get-ChildItem D:\Temp\ -ReadOnlyOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\* -ReadOnly     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -ar---       13-01-2020     18:19              0 Readonlyfile.txtYou can check the read-only attribute value in Mode property.

How to exclude specific file names using Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:52:30

4K+ Views

To exclude specific file(s) from being displayed in the output of Get- ChildItem, you need to specify the file name(s).CommandGet-ChildItem D:\Temp\ -Recurse -Exclude style.css, LGPO.exeOutputDirectory: D:\Temp\LGPO Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       01-06-2017     02:25         638115 LGPO.pdf     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------     ... Read More

How to Install and Configure MS SQL (Beta) on CentOS 7

Samual Sam
Updated on 23-Jan-2020 07:57:45

401 Views

In this article, we will learn about – How to install and configure MS SQL on CentOS 7. Microsoft has recently announced that they are planning to release the MS SQL for Linux. Specially the beta versions for RedHat enterprises Linux, Centos & Ubuntu but only with 64-bit editions.PrerequisitesA machine with a minimum of 4 GB RAM and 30 GB Hard disk space.A machine installed with CentOS 7.A user with root privileges or root user.MS SQL Server installation on CentOSSince MS SQL is not available with the default CentOS repository, we needed to add the MS SSQL repository details to ... Read More

How to exclude specific extension in Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:49:27

4K+ Views

To exclude specific extensions, you need to use –Exclude parameter in Get-ChildItem.ExampleFor example, as shown below when we run command, it will exclude .html files and display the rest.Get-ChildItem D:\Temp\ -Recurse -Exclude *.htmlOutputDirectory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d-----       24-11-2018     11:31                LGPO     Directory: D:\Temp\LGPO Mode                LastWriteTime         Length Name ---- ... Read More

How to search for files using the wildcard character (*) in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:48:25

4K+ Views

You can also search for files with a specific name or using the wildcard (*) character.CommandBelow command will search for the files (including hidden files) starting with “Bac”.Get-ChildItem D:\Temp -Recurse -Force -Include Bac*OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp -Recurse -Force -Include Bac*     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xmlCommandWhen you use the wildcard character (*) at both the ends, file ... Read More

How to use the wildcard character (*) in Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:47:45

3K+ Views

You can also search for files with a specific name or using the wildcard (*) character.CommandBelow command will search for the files (including hidden files) starting with “Bac”.Get-ChildItem D:\Temp -Recurse -Force -Include Bac*OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp -Recurse -Force -Include Bac*     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xmlCommandWhen you use the wildcard character (*) at both the ends, file ... Read More

How to search for a specific extension using Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:47:07

2K+ Views

To get the output of the get-childitem with a specific extension, we need to use –includeparameter.ExampleIn the below example, we will use the below script to get only .xml files.Get-ChildItem D:\Temp\ -Recurse -Include *.xmlOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Recurse -Include *.xml     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xml -a----       24-11-2018     11:34       ... Read More

What are the Opportunities in Artificial Intelligence?

karthikeya Boyini
Updated on 23-Jan-2020 07:55:46

740 Views

Artificial Intelligence is one the hot topic in the information and technology which predominantly includes general AI, machine learning, expert systems (which can be the same thing) data mining, Neural Networks and fuzzy systems. These topics have become the most wanted and essential topics among the scholars, students, faculties and professionals.As AI had already created enough impact among the public, this article would help the upcoming generation to know more about the career opportunities that are related to this domain. And we need to understand that fact that, Machine learning is the practical face of AI. It’s about identifying sources ... Read More

How to use Get-ChildItem in PowerShell to filter a specific extension?

Chirag Nagrekar
Updated on 23-Jan-2020 07:46:01

19K+ Views

To get the output of the get-childitem with a specific extension, we need to use –includeparameter.ExampleIn the below example, we will use the below script to get only .xml files.Get-ChildItem D:\Temp\ -Recurse -Include *.xmlOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Recurse -Include *.xml     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xml -a----       24-11-2018     11:34       ... Read More

Advertisements