Forked from greyboxsoftware/Find Alternate Data Streams Powershell
Created
April 19, 2018 17:07
-
-
Save jermdw/af6856ce4b51523b492df430c4534ed2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Grabs the path you wish to search | |
$getPath = Read-Host "What is the path you would like to search (example: c:\temp)" | |
#recursively searches through a path and grabs the data streams | |
$getItem = Get-ChildItem -Path $getPath -Recurse | Get-Item -Stream * | |
foreach($item in $getItem) { | |
#outputs the information to the console | |
Write-Host "Path: " $item.PSPath -ForegroundColor Green | |
Write-Host "Parent Path: " $item.PSParentPath -ForegroundColor Yellow | |
Write-Host "PSChildName: " $item.PSChildName -ForegroundColor Yellow | |
Write-Host "PSProvider: " $item.PSProvider -ForegroundColor Yellow | |
Write-Host "PSIsContainer: " $item.PSIsContainer -ForegroundColor Yellow | |
Write-Host "Filename: " $item.FileName -ForegroundColor Yellow | |
Write-Host "Stream: " $item.Stream -ForegroundColor Red | |
Write-Host "Length: " $item.Length -ForegroundColor Yellow | |
Write-Host "`n" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment