mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-06 00:50:07 +00:00
removed dead code
This commit is contained in:
@@ -211,104 +211,6 @@
|
||||
Remove-EmptyValue -Hashtable $Output -Recursive
|
||||
}
|
||||
return $Output
|
||||
<#
|
||||
foreach ($GPO in $GPOs) {
|
||||
if ($GPOPath) {
|
||||
$GPOOutput = $GPO.GPOOutput
|
||||
} else {
|
||||
[xml] $GPOOutput = Get-GPOReport -Guid $GPO.GUID -Domain $GPO.DomainName -ReportType Xml
|
||||
}
|
||||
[Array] $Data = Get-XMLStandard -GPO $GPO -GPOOutput $GPOOutput.GPO -Splitter $Splitter -FullObjects:$FullObjects
|
||||
foreach ($D in $Data) {
|
||||
if (-not $Output["$($D.GpoCategory)"]) {
|
||||
$Output["$($D.GpoCategory)"] = [ordered] @{}
|
||||
}
|
||||
if (-not $Output["$($D.GpoCategory)"]["$($D.GpoSettings)"]) {
|
||||
$Output["$($D.GpoCategory)"]["$($D.GpoSettings)"] = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
}
|
||||
$Output["$($D.GpoCategory)"]["$($D.GpoSettings)"].Add($D)
|
||||
|
||||
if (-not $OutputByGPO["$($D.DomainName)"]) {
|
||||
$OutputByGPO["$($D.DomainName)"] = [ordered] @{}
|
||||
}
|
||||
if (-not $OutputByGPO[$D.DomainName][$D.DisplayName]) {
|
||||
$OutputByGPO[$D.DomainName][$D.DisplayName] = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
}
|
||||
$OutputByGPO[$D.DomainName][$D.DisplayName].Add($D)
|
||||
}
|
||||
|
||||
}
|
||||
if ($NoTranslation) {
|
||||
if ($OutputType -contains 'Object') {
|
||||
$Output
|
||||
}
|
||||
} else {
|
||||
foreach ($Report in $Type) {
|
||||
$Category = $Script:GPODitionary[$Report]['Category']
|
||||
$Settings = $Script:GPODitionary[$Report]['Settings']
|
||||
$TranslatedOutput[$Report] = Invoke-GPOTranslation -InputData $Output -Category $Category -Settings $Settings -Report $Report
|
||||
}
|
||||
if ($OutputType -contains 'Object') {
|
||||
$TranslatedOutput
|
||||
}
|
||||
}
|
||||
|
||||
if ($NoTranslation) {
|
||||
$SingleSource = $Output
|
||||
} else {
|
||||
$SingleSource = $TranslatedOutput
|
||||
}
|
||||
|
||||
if ($OutputPath) {
|
||||
$FolderPath = $OutputPath
|
||||
} else {
|
||||
$FolderPath = [io.path]::GetTempPath()
|
||||
}
|
||||
if ($OutputType -contains 'HTML') {
|
||||
$FilePathHTML = [io.path]::Combine($FolderPath, "GPOZaurr-Summary-$((Get-Date).ToString('yyyy-MM-dd_HH_mm_ss')).html")
|
||||
Write-Warning "Invoke-GPOZaurr - $FilePathHTML"
|
||||
New-HTML {
|
||||
foreach ($GPOCategory in $SingleSource.Keys) {
|
||||
New-HTMLTab -Name $GPOCategory {
|
||||
if ($SingleSource["$GPOCategory"] -is [System.Collections.IDictionary]) {
|
||||
foreach ($GpoSettings in $SingleSource["$GPOCategory"].Keys) {
|
||||
New-HTMLTab -Name $GpoSettings {
|
||||
if ($SingleSource[$GPOCategory][$GpoSettings].Count -gt 0) {
|
||||
New-HTMLTable -DataTable $SingleSource[$GPOCategory][$GpoSettings] -ScrollX -DisablePaging -AllProperties -Title $GpoSettings
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($SingleSource[$GPOCategory].Count -gt 0) {
|
||||
New-HTMLTable -DataTable $SingleSource[$GPOCategory] -ScrollX -DisablePaging -AllProperties -Title $GpoSettings
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} -Online -ShowHTML:$Open.IsPresent -FilePath $FilePathHTML
|
||||
}
|
||||
if ($OutputType -contains 'Excel') {
|
||||
$FilePathExcel = [io.path]::Combine($FolderPath, "GPOZaurr-Summary-$((Get-Date).ToString('yyyy-MM-dd_HH_mm_ss')).xlsx")
|
||||
Write-Warning "Invoke-GPOZaurr - $FilePathExcel"
|
||||
foreach ($GPOCategory in $SingleSource.Keys) {
|
||||
if ($SingleSource["$GPOCategory"] -is [System.Collections.IDictionary]) {
|
||||
foreach ($GpoSettings in $SingleSource["$GPOCategory"].Keys) {
|
||||
if ($SingleSource[$GPOCategory][$GpoSettings].Count -gt 0) {
|
||||
ConvertTo-Excel -DataTable $SingleSource[$GPOCategory][$GpoSettings] -AllProperties -ExcelWorkSheetName $GpoSettings -FilePath $FilePathExcel -AutoFilter -AutoFit -Option Rename
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($SingleSource[$GPOCategory].Count -gt 0) {
|
||||
ConvertTo-Excel -DataTable $SingleSource[$GPOCategory] -AllProperties -ExcelWorkSheetName $GPOCategory -FilePath $FilePathExcel -AutoFilter -AutoFit -Option Rename
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($Open) {
|
||||
Invoke-Item -Path $FilePathExcel
|
||||
}
|
||||
}
|
||||
#>
|
||||
|
||||
}
|
||||
|
||||
[scriptblock] $SourcesAutoCompleter = {
|
||||
|
||||
Reference in New Issue
Block a user