diff --git a/Get-ProjectFolders.ps1 b/Get-ProjectFolders.ps1 index f53d999..3495f08 100644 --- a/Get-ProjectFolders.ps1 +++ b/Get-ProjectFolders.ps1 @@ -203,61 +203,61 @@ Invoke-SqliteQuery -DataSource $PathToDB -Query $Query ## Kick off GenTables -$SQLFile_to_Run = $PSScriptRoot + '\GenTables.sql' -Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run -$SQLFile_to_Run = $PSScriptRoot + '\DuplicatePairing.sql' -Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run +# $SQLFile_to_Run = $PSScriptRoot + '\GenTables.sql' +# Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run +# $SQLFile_to_Run = $PSScriptRoot + '\DuplicatePairing.sql' +# Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run $DBConnect = New-SqliteConnection -DataSource $PathToDB -foreach ($office in $OfficeList) { - $OfficeServer = $office.Name +# foreach ($office in $OfficeList) { +# $OfficeServer = $office.Name - $Query = "select * from OfficeDuplicates where Server = '$OfficeServer';" - $sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query +# $Query = "select * from OfficeDuplicates where Server = '$OfficeServer';" +# $sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query - if ($sql_result) { - $OutFile = $OutputFolder + "\$OfficeServer Duplicates.xlsx" - Remove-Item -Path $OutFile -Force - $sql_result | Export-Excel -Path $OutFile -AutoFilter +# if ($sql_result) { +# $OutFile = $OutputFolder + "\$OfficeServer Duplicates.xlsx" +# Remove-Item -Path $OutFile -Force +# $sql_result | Export-Excel -Path $OutFile -AutoFilter - } -} +# } +# } # Generate MPE All Xlsx -$Query = "select * from OfficeDuplicates;" -$sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query +# $Query = "select * from OfficeDuplicates;" +# $sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query -if ($sql_result) { - $OutFile = $OutputFolder + "\MPE All Duplicates.xlsx" - Remove-Item -Path $OutFile -Force - $sql_result | Export-Excel -Path $OutFile -AutoFilter +# if ($sql_result) { +# $OutFile = $OutputFolder + "\MPE All Duplicates.xlsx" +# Remove-Item -Path $OutFile -Force +# $sql_result | Export-Excel -Path $OutFile -AutoFilter -} +# } # Generate Parent Non-Duplicates -$Query = "select * from NonDupParent;" -$sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query +# $Query = "select * from NonDupParent;" +# $sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query -if ($sql_result) { - $OutFile = $OutputFolder + "\MPE Non-Duplicates - Parent Folders.xlsx" - Remove-Item -Path $OutFile -Force - $sql_result | Export-Excel -Path $OutFile -AutoFilter +# if ($sql_result) { +# $OutFile = $OutputFolder + "\MPE Non-Duplicates - Parent Folders.xlsx" +# Remove-Item -Path $OutFile -Force +# $sql_result | Export-Excel -Path $OutFile -AutoFilter -} +# } -# Generate Project Non-Duplicates +# # Generate Project Non-Duplicates -$Query = "select * from NonDupProject where Path NOT IN (select Path from NonDupParent);" -$sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query +# $Query = "select * from NonDupProject where Path NOT IN (select Path from NonDupParent);" +# $sql_result = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query -if ($sql_result) { - $OutFile = $OutputFolder + "\MPE Non-Duplicates - Project Folders.xlsx" - Remove-Item -Path $OutFile -Force - $sql_result | Export-Excel -Path $OutFile -AutoFilter +# if ($sql_result) { +# $OutFile = $OutputFolder + "\MPE Non-Duplicates - Project Folders.xlsx" +# Remove-Item -Path $OutFile -Force +# $sql_result | Export-Excel -Path $OutFile -AutoFilter -} +# } ## Generate Egnyte Data Inventory Sheet