i said Shush...
This commit is contained in:
parent
111f4dbb91
commit
aec05f5f69
@ -221,14 +221,21 @@ if ($sql_result) {
|
|||||||
|
|
||||||
## Generate Egnyte Data Inventory Sheet
|
## Generate Egnyte Data Inventory Sheet
|
||||||
|
|
||||||
$OutFile = $OutputFolder + "\MPE Data Inventory " + (Get-Date -Format FileDateTime).DateTime + ".xlsx"
|
$OutFile = $OutputFolder + "\MPE Data Inventory " + (Get-Date -Format FileDateTime) + ".xlsx"
|
||||||
Remove-Item -Path $OutFile -Force
|
try {
|
||||||
|
|
||||||
|
Remove-Item -Path $OutFile -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
<#Do this if a terminating exception happens#>
|
||||||
|
}
|
||||||
$SQLFile_to_Run = $PSScriptRoot + '\Generate Egnyte Export.sql'
|
$SQLFile_to_Run = $PSScriptRoot + '\Generate Egnyte Export.sql'
|
||||||
$EgnyteExport = Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run
|
Invoke-SqliteQuery -DataSource $PathToDB -InputFile $SQLFile_to_Run
|
||||||
|
$EgnyteExport = Invoke-SqliteQuery -DataSource $PathToDB -Query "Select * from DataInventory"
|
||||||
|
|
||||||
if ($EgnyteExport) {
|
if ($EgnyteExport) {
|
||||||
|
|
||||||
$OutFile = Export-Excel -Path $OutputFile -AutoFilter
|
$EgnyteExport | Export-Excel -Path $OutFile -AutoFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user