• Thanks for the responses. I am unsure how to loop through each database to get the data file location. Any help on this would be appriciated.

    I would like to incorperate this into the code. The output from this is exactly what I need:

    $subFolders = Get-ChildItem -Name $networkPath

    foreach ($Folder in $subFolders){

    $cmd = "cacls $networkPath\$Folder"

    Write-Output "Running Commamnd: $cmd" >> $permsLogFile

    Invoke-Expression $cmd | Write-Output >> $permsLogFile}

    I need help with getting the database file path location for each database and run the path through the code above. Can anyone help?