Microsoft Technologies Articles - Page 197 of 204

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

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

Chirag Nagrekar
Updated on 23-Jan-2020 07:41:17

924 Views

To display files along with hidden files, you need to use –Force parameter.CommandGet-ChildItem D:\Temp\ -ForceOutputIf 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

How to display files/folders including hidden files/folders in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:40:15

688 Views

To display files along with hidden files, you need to use –Force parameter.CommandGet-ChildItem D:\Temp\ -ForceOutputIf 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

How to get only hidden files and folders in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:38:59

1K+ Views

To display only hidden files and folders –hidden parameter is used while using Get-ChildItem.CommandGet-ChildItem D:\Temp\ -HiddenOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Hidden     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a-h--       13-12-2019     09:52           6182 Hiddenfile1.xlsxCommandSimilarly, you can use this –Hidden with –Recurse or–DepthGet-ChildItem D:\Temp\ -Recurse -HiddenOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Recurse -Hidden     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a-h--       13-12-2019     09:52           6182 Hiddenfile1.xlsx     Directory: D:\Temp\GPO_backup Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a-h--       13-12-2019     09:52              0 HiddenFile2.txt

How to use Depth pararmeter in Get-ChildItem PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:38:08

3K+ Views

When –Depth parameter is used along with Get-ChildItem, it controls the recursion of displaying the subfolders and their contents. For example, if –Depth parameter is set to 1 then it will display only the content of the parent folder and immediate subfolders but not the subfolders of the subfolders.CommandWhen you specify –Depth parameter, no need to add –Recursion parameter. It will automatically set the depth level.Get-ChildItem D:\Temp\ -Depth 1OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Depth 1     Directory: D:\Temp Mode                LastWriteTime         Length Name ----             ... Read More

How to control recursion in Get-ChildItem in PowerShell?

Chirag Nagrekar
Updated on 23-Jan-2020 07:37:03

1K+ Views

When –Depth parameter is used along with Get-ChildItem, it controls the recursion of displaying the subfolders and their contents. For example, if –Depth parameter is set to 1 then it will display only the content of the parent folder and immediate subfolders but not the subfolders of the subfolders.CommandWhen you specify –Depth parameter, no need to add –Recursion parameter. It will automatically set the depth level.Get-ChildItem D:\Temp\ -Depth 1OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Depth 1     Directory: D:\Temp Mode                LastWriteTime         Length Name ----             ... Read More

How to use the -recursive parameter in Get-ChildItem using PowerShell?

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

1K+ Views

To display the contents of the subfolders including files and folders, -Recurse parameter is used.CommandGet-ChildItem -Path D:\Temp -Recurse-Recurse parameter will not display the hidden files and folders.OutputDirectory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d-----       13-12-2019     09:52                GPO_backup d-----       24-11-2018     11:31                LGPO -a----       07-05-2018     23:00     ... Read More

How to list the subfolder contents using Get-ChildItem using PowerShell?

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

8K+ Views

To display the contents of the subfolders including files and folders, -Recurse parameter is used.CommandGet-ChildItem -Path D:\Temp -Recurse-Recurse parameter will not display the hidden files and folders.OutputDirectory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d-----       13-12-2019     09:52                GPO_backup d-----       24-11-2018     11:31                LGPO -a----       07-05-2018     23:00     ... Read More

Microsoft’s Mixed Reality Headset – One Step Ahead

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

143 Views

You may have got the chance to experience one of the amazing headsets powered with awesome technologies as Augmented Reality (AR) or Virtual Reality (VR) and fallen in love with them. And that must be a wonderful experience when you enjoy a roller coaster ride or swimming in a deep sea in the virtual world still sitting on your couch in your living room with a VR or AR headset. Isn’t it amazing, when you think that how much the technologies evolved so far? It is not so long back when these headsets were only used for listening songs or ... Read More

Microsoft Emergency Path for RCE (Remote Code Execution) in Windows Malware Scanner (CVE-2017-0290)

karthikeya Boyini
Updated on 23-Jan-2020 07:13:48

191 Views

The famous security researcher Tavis Ormandy has recently announced on Twitter that he and his researcher Natalie Silvanovich has discovered a vulnerability called “Remote Code Execution” in recent memory. According to them, the vulnerability will work against the default installation which is “Wormable” has the ability to replicate itself on an infected computer and then spread to the other PCs automatically in the network.Microsoft has announced that their own antivirus is made of Windows 7, 8.0, 8.1 and 10 computers as well as Windows Server 2016, is vulnerable due to the latest released out-of-band update for the patch “Remote Code ... Read More

Advertisements