#Scan Funktion vereinfacht dargestellt

$Start=Get-Date
Get-Childitem H:\ -Recurse | Format-Table -property FullName
$Stamp=Get-Date
function null {
    $collection = Get-ChildItem -path H:\ -Directory
    foreach ($item in $collection) {
        Write-Host $item.FullName
        eins $item.fullname
        zwei $item.FullName
    }
}
function eins {
    param($folder)
    $collection = Get-ChildItem -path $folder -File
    foreach ($item in $collection){
        Write-Host $item.FullName
    }
}
function zwei {
    param($folder)
    $collection = Get-ChildItem -path $folder -Directory
    foreach ($item in $collection){
    Write-Host $item.FullName
    eins $item.FullName
    zwei $item.FullName
    }
}
null
$Finish=Get-Date
Write-Host "Start: $Start Zwischenzeit: $Stamp Ende: $Finish"
