diff --git a/Private/Get-XMLOutput.ps1 b/Private/Get-XMLOutput.ps1 deleted file mode 100644 index c84cdd6..0000000 --- a/Private/Get-XMLOutput.ps1 +++ /dev/null @@ -1,72 +0,0 @@ -function Get-XMLOutput { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($GpoType in @('User', 'Computer')) { - if ($GPOOutput.$GpoType.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$GpoType.ExtensionData.Extension) { - # It's possible that one of the ExtensionType records has value null. Weird but happend. - if ($ExtensionType) { - $GPOSettingTypeSplit = ($ExtensionType.type -split ':') - try { - $KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') } - } catch { - Write-Warning "Get-XMLStandard - things went sideways $($_.Exception.Message)" - continue - } - foreach ($GpoSettings in $KeysToLoop.Name) { - $Template = [ordered] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - GpoType = $GpoType - GpoCategory = $GPOSettingTypeSplit[1] - GpoSettings = $GpoSettings - } - [PSCustomObject] $Template - } - continue - - foreach ($GpoSettings in $KeysToLoop.Name) { - foreach ($Key in $ExtensionType.$GpoSettings) { - $Template = [ordered] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - GpoType = $GpoType - GpoCategory = $GPOSettingTypeSplit[1] - GpoSettings = $GpoSettings - } - try { - $Properties = ($Key | Get-Member -MemberType Properties -ErrorAction Stop).Name - } catch { - Write-Warning "Get-XMLStandard - things went sideways 1 $($_.Exception.Message)" - $Properties = $null - } - foreach ($Property in $Properties) { - $Template["$Property"] = $Key.$Property - } - $Template['Linked'] = $LinksInformation.Linked - $Template['LinksCount'] = $LinksInformation.LinksCount - $Template['Links'] = $LinksInformation.Links - <# - $Template['IncludeComments'] = $GPOOutput.IncludeComments # : true #: true - $Template['CreatedTime'] = $GPOOutput.CreatedTime # : 2020-06-17T11:23:22 #: 2020-06-17T11:23:22 - $Template['ModifiedTime'] = $GPOOutput.ModifiedTime # : 2020-06-28T15:49:52 #: 2020-06-28T15:49:52 - $Template['ReadTime'] = $GPOOutput.ReadTime # : 2020-06-28T16:14:09.2209011Z #: 2020-06-28T16:14:09.2209011Z - $Template['SecurityDescriptor'] = $GPOOutput.SecurityDescriptor # : SecurityDescriptor #: SecurityDescriptor - $Template['FilterDataAvailable'] = $GPOOutput.FilterDataAvailable # : true #: true - #> - [PSCustomObject] $Template - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/Get-XMLStandard.ps1 b/Private/Get-XMLStandard.ps1 deleted file mode 100644 index f082b93..0000000 --- a/Private/Get-XMLStandard.ps1 +++ /dev/null @@ -1,59 +0,0 @@ -function Get-XMLStandard { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($GpoType in @('User', 'Computer')) { - if ($GPOOutput.$GpoType.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$GpoType.ExtensionData.Extension) { - # It's possible that one of the ExtensionType records has value null. Weird but happend. - if ($ExtensionType) { - $GPOSettingTypeSplit = ($ExtensionType.type -split ':') - try { - $KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') } - } catch { - Write-Warning "Get-XMLStandard - things went sideways $($_.Exception.Message)" - continue - } - foreach ($GpoSettings in $KeysToLoop.Name) { - foreach ($Key in $ExtensionType.$GpoSettings) { - $Template = [ordered] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - GpoType = $GpoType - GpoCategory = $GPOSettingTypeSplit[1] - GpoSettings = $GpoSettings - } - try { - $Properties = ($Key | Get-Member -MemberType Properties -ErrorAction Stop).Name - } catch { - Write-Warning "Get-XMLStandard - things went sideways 1 $($_.Exception.Message)" - $Properties = $null - } - foreach ($Property in $Properties) { - $Template["$Property"] = $Key.$Property - } - $Template['Linked'] = $LinksInformation.Linked - $Template['LinksCount'] = $LinksInformation.LinksCount - $Template['Links'] = $LinksInformation.Links - <# - $Template['IncludeComments'] = $GPOOutput.IncludeComments # : true #: true - $Template['CreatedTime'] = $GPOOutput.CreatedTime # : 2020-06-17T11:23:22 #: 2020-06-17T11:23:22 - $Template['ModifiedTime'] = $GPOOutput.ModifiedTime # : 2020-06-28T15:49:52 #: 2020-06-28T15:49:52 - $Template['ReadTime'] = $GPOOutput.ReadTime # : 2020-06-28T16:14:09.2209011Z #: 2020-06-28T16:14:09.2209011Z - $Template['SecurityDescriptor'] = $GPOOutput.SecurityDescriptor # : SecurityDescriptor #: SecurityDescriptor - $Template['FilterDataAvailable'] = $GPOOutput.FilterDataAvailable # : true #: true - #> - [PSCustomObject] $Template - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/Invoke-GPOTranslation.ps1 b/Private/Invoke-GPOTranslation.ps1 deleted file mode 100644 index af7aa63..0000000 --- a/Private/Invoke-GPOTranslation.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Invoke-GPOTranslation { - [cmdletBinding()] - param( - [System.Collections.IDictionary] $InputData, - [string] $Report, - [string] $Category, - [string] $Settings - ) - if ($Category -and $Settings -and $InputData) { - if ($Script:GPODitionary[$Report]['Code']) { - $Script:GPOList = $InputData.$Category.$Settings - return & $Script:GPODitionary[$Report]['Code'] - } - } -} \ No newline at end of file diff --git a/Private/Script.GPOPropertiesComputers.ps1 b/Private/Script.GPOPropertiesComputers.ps1 deleted file mode 100644 index 6d88234..0000000 --- a/Private/Script.GPOPropertiesComputers.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -$Script:GPOPropetiesComputers = [ordered] @{ - 'Account' = '' - 'Audit' = '' - 'AuditSetting' = '' - 'AutoEnrollmentSettings' = '' - 'Blocked' = '' - 'certSettingsTrustedPublishers' = '' - 'DataSourcesSettings' = '' - 'DomainProfile' = '' - 'Dot3SvcSetting' = '' - 'EFSRecoveryAgent' = '' - 'EFSSettings' = '' - 'EnvironmentVariables' = '' - 'EventLog' = '' - 'File' = '' - 'FilesSettings' = '' - 'Folders' = '' - 'General' = '' - 'Global' = '' - 'GlobalSettings' = '' - 'InboundFirewallRules' = '' - 'IntermediateCACertificate' = '' - 'InternetZoneRule' = '' - 'LocalUsersAndGroups' = '' - 'MsiApplication' = '' - 'NetworkOptions' = '' - 'NetworkShares' = '' - 'NTServices' = '' - 'OutboundFirewallRules' = '' - 'PathRule' = '' - 'Policy' = '' - 'PowerOptions' = '' - 'PrinterConnection' = '' - 'Printers' = '' - 'PrivateProfile' = '' - 'PublicProfile' = '' - 'Registry' = '' - 'RegistrySetting' = '' - 'RegistrySettings' = '' - 'RestrictedGroups' = '' - 'RootCertificate' = '' - 'RootCertificateSettings' = '' - 'ScheduledTasks' = '' - 'Script' = '' - 'SecurityOptions' = '' - 'ShortcutSettings' = '' - 'SystemServices' = '' - 'TrustedPublishersCertificate' = '' - 'type' = '' - 'UserRightsAssignment' = '' - 'WLanSvcSetting' = '' -} \ No newline at end of file diff --git a/Private/Script.GPOPropertiesUsers.ps1 b/Private/Script.GPOPropertiesUsers.ps1 deleted file mode 100644 index 450dae2..0000000 --- a/Private/Script.GPOPropertiesUsers.ps1 +++ /dev/null @@ -1,54 +0,0 @@ -$Script:GPOPropertiesUsers = [ordered] @{ - 'AutoDetectConfigSettings' = '' - 'AutoEnrollmentSettings' = '' - 'AutomaticConfiguration' = '' - 'AutoSetupSetting' = '' - 'Blocked' = '' - 'BrowserTitle' = '' - 'CustomSetupSetting' = '' - 'DataSourcesSettings' = '' - 'DefinesConnectionSettings' = '' - 'DefinesEscOffSettings' = '' - 'DefinesEscOnSettings' = '' - 'DeleteChannels' = '' - 'DriveMapSettings' = '' - 'EscOffLocalSites' = '' - 'EscOffSecurityZoneAndPrivacy' = '' - 'EscOffTrustedSites' = '' - 'EscOnLocalSites' = '' - 'EscOnSecurityZoneAndPrivacy' = '' - 'EscOnTrustedSites' = '' - 'FavoriteURL' = '' - 'FilesSettings' = '' - 'Folder' = '' - 'FolderOptions' = '' - 'Folders' = '' - 'General' = '' - 'HomePage' = '' - 'ImportedContentRatings' = '' - 'InternetOptions' = '' - 'LocalUsersAndGroups' = '' - 'MsiApplication' = '' - 'NetworkOptions' = '' - 'PathRule' = '' - 'PlaceFavoritesAtTop' = '' - 'Policy' = '' - 'PowerOptions' = '' - 'PreferenceMode' = '' - 'PrinterConnection' = '' - 'Printers' = '' - 'Programs' = '' - 'ProxySettings' = '' - 'RegionalOptionsSettings' = '' - 'RegistrySetting' = '' - 'RegistrySettings' = '' - 'RestartSetupSetting' = '' - 'ScheduledTasks' = '' - 'Script' = '' - 'SearchBar' = '' - 'ShortcutSettings' = '' - 'StartMenuSettings' = '' - 'ToolsSetting' = '' - 'TrustedPublisherLockdown' = '' - 'type' = '' -} \ No newline at end of file